[Interest] Qt5 and "global" configuration

Jérôme Godbout jerome at bodycad.com
Wed Nov 12 22:52:26 CET 2014


In the same line about the style, I was wondering the same thing to set a
global style for a particular widgets a little while ago:
http://qt-project.org/forums/viewthread/45862/

Would have been nice to avoid setting style to each controls individualy.
The only things I see is making a singleton and use a CustomButton that go
fetch it's style into the singleton. This help a lot when using style that
can be changed at runtime (like a full theme, my application have
'Desktop', 'Default', 'Custom' and 'Custom Compact' for example. This mean
using a custom wraper and maintain it for every controls. I asked the same
questions to avoid this. I still would love too see something to avoid the
singleton and those wraper that only set style.


I also happen to have the desktop style problems compare to default style.
http://qt-project.org/forums/viewthread/47952/
import "qrc:/QtQuick/Controls/Styles/Desktop"
does the trick, thanks to jseeQt <http://qt-project.org/mebmer/143119> to
point it to me.
Would be nice to have an official way to load those Desktop Style (or the
current one used by default) if we need to change some of the properties.


On Wed, Nov 12, 2014 at 3:46 PM, Thiago Macieira <thiago.macieira at intel.com>
wrote:

> On Wednesday 12 November 2014 12:18:02 René J.V. Bertin wrote:
> > One of the really nice things in Qt4 was that one could take the
> appearance
> > parameters available for individual applications (style, default font but
> > also the font replacement table) and set them on a system/user-wide basis
> > via qtconfig.
> > >From what I understand these individual settings still exist in Qt5, but
> > >the possibility to set them globally has been removed.
> > Why is that, and what are the chances to get it back by popular request
> (or
> > "apopular request" if it wasn't all that popular to begin with :)) ?
>
> It was removed for three reasons:
>
> 1) application self-containing: we don't want to open files we shouldn't,
> especially on more locked-down platforms like OS X
>
> 2) performance: we want to avoid hitting the disk if we can and parse
> configuration files
>
> 3) delegation: this is delegated to the platform theme plugins. Qt
> applications are meant to look like the system, therefore the the plugin
> will
> decide what the application should look like and which files it needs to
> read
> in order to come to the right decisions.
>
> We could provide a plugin that reads configuration files, but it would not
> be
> the default in any platform.
>
> > This is coming from someone working on Linux and OS X, and who thinks
> that
> > the default "aqua" style is a mixed bag. It somehow looks outdated, and
> > spacing tends to be much too ample (on non-Retina displays at least).
> Also,
> > the system default font (Lucida Grande) is applied even if this was
> changed
> > through a utility like TinkerTool, and in the point size that even OS X
> > uses only in menus and window titlebars (13 or even 14 point). That's
> just
> > too large for most UI elements (and if scaling is done right I presume
> that
> > to be true on Retina displays too).
>
> Maybe you should not use an OS that you don't like?
>
> Anyway, the majority opinion is that Qt should look like the OS's own look-
> and-feel.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141112/aee8bd41/attachment.html>


More information about the Interest mailing list