[PyQt] QIcon.fromTheme() additinal parameters

Juan Manuel Santos vicariousdm at gmail.com
Wed Jun 16 16:57:55 BST 2010


Hello everyone,

I've recently started in the PyQT4 world. I come from PyGTK so there are
some things I'm already used to.

One of the things I've used to do, is to lookup icons by name in the current
system icon theme. I investigated a bit, and I was glad to find the
QIcon.fromTheme() method (too bad it's still not integrated in QTDesigner :(
).

However, in PyGTK you have some additional parameters to set the size of the
icon to look up, and wether you want it to be SVG or not (which is quite
useful especially if you want to show a big icon in special circumstances).
I've searched but I couldn't find any info regarding these two points, so my
questions are:
-Does QT provide such features and PyQT4 is lacking? Or should this enquiry
be taken to the QT crew?
-If there are not indeed such parameters to specify, how does PyQT4/QT know
which icon size is the one I want? Based on the size of the widget where the
icon goes? And what happens if that widget is resized?

Thanks for your time (my first post on this list, hope to stay for a long
time as I'm thinking of replacing PyGTK with PyQt4 for my projects :)

Cheers,
Juan Manuel Santos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100616/7907811d/attachment.html>


More information about the PyQt mailing list