How to choose the graphic toolkit for PyQt

半城伤御伤魂 提交于 2019-12-12 09:43:22

问题


I'm developing an PyQt application for my clients. The problem is that my default graphical is Gnome and my client KDE. So there is some difference I can not contrôle.

How can I force the pyQt to choose the good graphical system (Gnome) instead of the default system (KDE)?


回答1:


Use QApplication::setStyle ( QStyle * style ) with one of these values as parameter:

  • plastique
  • cde
  • motif
  • sgi
  • windows
  • cleanlooks
  • mac



回答2:


app.setStyle(QStyleFactory.create("plastique"))

is the way to go



来源:https://stackoverflow.com/questions/14200167/how-to-choose-the-graphic-toolkit-for-pyqt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!