PDA

View Full Version : Using custom QStylePlugins with PyQt?



Johannes
3rd August 2011, 11:07
Hi,
I have a dll with a QStylePlugin in it. I can use it by putting the dll into a folder named styles next to the exe-file which is using it and by typing a code line like this:

QApplication::setStyle(QStyleFactory::create("stylename"));

How can I use it with PyQt in Python? I used the QStyleFactory already with the preinstalled styles, like

app.setStyle(QtGui.QStyleFactory.create("cleanlooks"))
But where do I have to put the dll so that the QStyleFactory in Python/PyQt will find it?
The custom style isn't in the key list of QStyleFactory in Python/PyQt.