Search code examples
pythonpyqt5

Is it possible to set QApplication style in QtDesigner?


I am currently working on a GUI application using PyQt5 and QtDesigner. As I have to make it multi-platform (at least Ubuntu and W10) I will use the "Fusion" style to make it look similar on both platforms.

I was wondering if one could simply set the QApplication style directly in QtDesigner ? I know that a simple <<.setStyle("Fusion")>> will do the trick in the code, but does it exist within QtDesigner so the lines can be automatically generated ?

I'm trying to learn QtDesigner and how much it can be pushed before going into the code.


Solution

  • No, it is not possible to set the style through Qt Designer.

    What Qt Designer does allow is to display the GUI with different styles if you select Form-> Preview -> ...