<table><tr><td style="">alexeymin added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14000">View Revision</a></tr></table><br /><div><div><p>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: <tt style="background: #ebebeb; font-size: 13px;">QWidget: Cannot create a QWidget without QApplication</tt>. 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.</p>
<p>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. ( <a href="https://github.com/minlexx/test_qqc2hello" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/minlexx/test_qqc2hello</a> - repo with test scripts )</p>
<p>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) 😄</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R858 Qt Quick Controls 2: Desktop Style</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14000">https://phabricator.kde.org/D14000</a></div></div><br /><div><strong>To: </strong>rjvbb, Frameworks<br /><strong>Cc: </strong>alexeymin, davidedmundson, mart, broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>