QML vs Qt Designer vs clean code? (in the context of PyQt)

I am a greedy pythonista who wants to create my first serious GUI desktop application, and it seems that Qt is the best option for this, so I started to study it, and I seem to find there three options for how you can create your interface :

  • QML
  • Qt Designer
  • Pure code (python / C ++ only)

Now I'm trying to find out if there are differences in the capabilities of these three approaches. Do I have the same amount of control with all three? What are the pros and cons?

Also, how much control do I have? Can I customize the user interface to some extent, for example, in the Spotify interface, where almost everything is a unique user widget? Or am I stuck in more or less general cases from boxes?

+5
source share
4 answers

I have been working with PyQt for some time (4 years), and I prefer user interface coding for simple applications; but for the rest I use Qt Designer. With PyQt, you can convert the .ui file generated by the constructor into a .py file, so if something is not to your liking, you can always override it in your code (for example, override QWidgets, etc.).

... , Qt CSS , , . QML - , , , - , , , JavaScript , Spotify JS ( ).

, , Windows, , "" Qt vs QML, Windows Forms XAML/Windows Store Windows 8.

: , "look'n'feel" Qt, , , , QML.

+2

Qt Designer . , , .

, .ui .py ( ), , PyQt4.uic PySide.QtUiTools. , , , / ( , my_ui). , my_ui.my_object_name, my_object_name - , Qt Designer.

, :

  • py
  • - , ,

Qt Designer , QLabel () , , QLabel, . , Qt Designer, .

- .ui PySide PyQt (qtutils), .

QML, , , , , QWidgets. , , / Qt, QML .

Qt Designer , QML , , .

+5

, - . , , . \ , GUI . , , - Qt Designer , . , YMMV.

+3

, PyQt. QWidgets Qml. Qml - GUI. . QML . QML - . , , , qim. . , , Windows. , Linux, android, macOs, iO, .

0

All Articles