<table><tr><td style="">rjvbb edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-4wi6etarsut37hm/">(Show Details)</a><br />rjvbb edited reviewers, added: Frameworks; removed: Framework: Syntax Highlighting.<br />rjvbb set the repository for this revision to R858 Qt Quick Controls 2: Desktop Style.
</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><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>The current implementation creates a local instance of <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Qt's built-in Fusion style, and probably doesn't need to create a new instance for each new KQuickStyleItem instance.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">the user's current desktop style obtained from KConfig,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Being a Tier3 framework it should be possible to fetch the current desktop</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">with Qt's built-in Fusion</span> style <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">through KConfig,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">as fallback.</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">in which case c</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">C</span>reating a new QStyle instance <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">would be (more) justified</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">is an easy way to follow changes to the user style</span>. There's probably some optimisation to be done here though I'm not convinced it will make any difference in practice, in the general context of using QtQuick.<br />
<br />
An alternative approach would be to do the programmatic equivalent of the command-line override (e.g. `quickcontrols2/gallery/gallery -style Default`) but I have not yet been able to figure out if it is possible to change the QQuickStyle at this point<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">. Probably not</span>.</div></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, Framework: Syntax Highlighting<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>