Changing the QGIS application style on Windows


By default QGIS uses the Qt QPlastiqueStyle for all its windows which makes QGIS render all controls like this:

Default style for QGIS on windows.

However it can be changed in order to make it fit in with system style, as in use Windows style. Running the following commands in the python console:

from PyQt4.QtGui import QApplication
QApplication.setStyle("windowsvista")

will change QGIS to render controls in windows style:

QGIS using windows style.

It’s quite hard to notice many of the differences but just try it you will see them

However there is one limitation. QGIS will not remember that setting as the compiled binary forces QGIS running on Windows into QPlastiqueStyle.

I have started working on a patch to give the user a choice in the options which control rendering style they would like to use. I think choice in these situations is good because I have grown to like the QPlastiqueStyle, mainly because I have used it so much , but other people I know prefer the Windows Vista style controls.

Advertisements

3 thoughts on “Changing the QGIS application style on Windows

  1. N.B. that sometimes the window won’t refresh properly when you change the style, so you need to minimise then restore it.

    > but other people I know prefer the Windows Vista style controls.

    Madness ;)
    Of course, if you are using the Windows classic theme you can get a nice clean, space-saving look… but using the windows style disables middle-click in scroll bars to scroll to location, so I could never do that!

    What other styles are there?
    – cleanlooks
    – motif
    – CDE (like motif but slightly cleaner)
    – ?

    I wonder if it is possible to enable middle-click scrolling for the Windows style… and if there is any other functionality that changes depending on the style.

  2. These works (At least :-) :

    “windows”, “motif”, “cde”, “plastique”, “windowsxp”, “windowsvista”, “cleanlooks”

    And now: Back to work….

    Regards
    Victor Thomsen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s