[PyQt] Which QStyle

Mads Ipsen mpi at comxnet.dk
Wed Jul 22 12:26:55 BST 2009


Matt Newell wrote:
> On Tuesday 21 July 2009 13:46:09 Mads Ipsen wrote:
>   
>> How do I programatically determine which style I am using, i.e. whether
>> it's QWindowsStyle, QMacStyle, QMotifStyle etc.
>>     
>
> style = QApplication.instance().style()
> print style.metaObject().className()
>
>
> Matt
>
>   
Thanks. I believe one could argue that a Qt provided convenience method 
along the lines 

style = QApplication.instance().style()
print style.name()

would be in place.

Best regards, Mads


-- 
+------------------------------------------------------------+
| Mads Ipsen, Ph.D, Scientific software developer            |
+------------------------------+-----------------------------+
| QuantumWise A/S              | phone:         +45-29716388 |
| Nørresøgade 27A              | www:    www.quantumwise.com |
| DK-1370 Copenhagen, Denmark  | email:  mpi at quantumwise.com |
+------------------------------+-----------------------------+




More information about the PyQt mailing list