D14000: qqc2-desktop-style: basic support for QGuiApplication-based apps (WIP/PoC)

Alexey Min noreply at phabricator.kde.org
Mon Jul 16 16:58:39 BST 2018


alexeymin added a comment.


  Don't know how much offtopic will be what I'm going to say, but I recently ran into an issue while packaging QQC2 application in flatpak with org.kde.Platform//5.9 runtime. My app was functioning perfectly fine in system, but under flatpak it failed to start with the following message: `QWidget: Cannot create a QWidget without QApplication`. Of course, I had only QGuiApplication. But I wasn't using widgets! The only class from QtWidgets was QSystemTrayIcon for a nice integration with desktop. My guess was that was caused by platform style used in flatpak's KDE runtime may use widgets. But this was unexpected, without flatpak all was working. In the end I was forced to use QApplication, and visually saw the style used was ogr.kde.desktop.
  
  I wrote a small test QML QQC2 program with QGuiApplication and packaged it with flatpak with the same runtime, surprisingly, it started OK, without any error message. Basically, QQC2 ApplicationWindow with a button inside, not linked to widgets. ( https://github.com/minlexx/test_qqc2hello - repo with test scripts )
  
  So, if the program is linked to Qt5Widgets in any way, it has to use QApplication in flatpak's org.kde.Platform even if it does not use widgets? Is it related to this patch? Will it solve my problem? (if included in flatpak's kde runtime) 😄

REPOSITORY
  R858 Qt Quick Controls 2: Desktop Style

REVISION DETAIL
  https://phabricator.kde.org/D14000

To: rjvbb, #frameworks
Cc: alexeymin, davidedmundson, mart, broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180716/4944d2e5/attachment-0001.html>


More information about the Plasma-devel mailing list