[Interest] QApplication instead of QGuiApplication for QML only projects?

Bernhard B schluchti at gmail.com
Fri Jun 23 19:21:20 CEST 2017


Hi,

up to now I always used QGuiApplication when developing QML only
applications. However, the QtCharts module requires QApplication instead of
QGuiApplication, otherwise it stops with an assert:

"ASSERT: "Unable to render embedded object: File ("No style available
without QApplication) not found". (see
https://bugreports.qt.io/browse/QTBUG-49895 )

I now replaced QGuiApplication with QApplication, which _seems_ to work (at
least I couldn't recognize any strange behaviour after a quick test). But
is it really safe to use QApplication instead of QGuiApplication for all
platforms (desktop, android, iOs..)? Or are there any hidden pitfalls doing
that?

Thanks,
Bernhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170623/b730f9ab/attachment.html>


More information about the Interest mailing list