Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:qt

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Nächste ÜberarbeitungBeide Seiten der Revision
en:qt [2022/08/25 10:19] – [Menu] roehneren:qt [2023/05/09 14:50] – [Precondition] roehner
Zeile 1: Zeile 1:
 ===== Precondition ===== ===== Precondition =====
-To use the modern and powerful Qt library, you need to install the PyQt6 package. To do this, call up the command Install //tools/install packages with PIP// via the GuiPy tools menu and enter //PyQt6// as the package name.+To use the modern and powerful Qt library, you need to install the PyQt6 package. To do this, call up the command Install //tools/install packages with PIP// via the GuiPy tools menu and enter //PyQt6// as the package name. You can use the //pip list// command to display the list of currently installed packages.
  
-Alternatively, you can install the PySide6 package and replace PyQt6 with PySide6 in the Qt template. The Qt template can be found in the configuration under Editor/File templates.+In addition, you should install the PySide6 package in order to be able to run source code based on it. 
 + 
 +One of the major changes in PyQt6 is the need to use fully qualified names for enums and flags. For example in PyQt5 and PySide2 you could just write Qt.DecorationRole or Qt.AlignLeft. This shortened form no longer works in PyQt6, you now have to write Qt.ItemDataRole.DisplayRole or Qt.Alignment.AlignLeft. This change affects all enums and flag types in Qt. Both long and short names are still supported in PySide6. 
 + 
 +If you prefer to work with the shortened forms, you can replace PyQt6 with PySide6 in the Qt template. The Qt template can be found in the configuration under Editor/File templates.
  
 Detailed information about Qt can be found in the [[https://doc.qt.io/qtforpython/PySide6/QtWidgets/index.html#module-PySide6.QtWidgets|documentation]] or [[https://doc.qt.io/qt-6/index.html|documentation Qt]]. Detailed information about Qt can be found in the [[https://doc.qt.io/qtforpython/PySide6/QtWidgets/index.html#module-PySide6.QtWidgets|documentation]] or [[https://doc.qt.io/qt-6/index.html|documentation Qt]].
Zeile 70: Zeile 74:
 ==== CheckBox ==== ==== CheckBox ====
 {{:checkbutton.png}} {{:checkbutton.png}}
-A CheckBox may or may not be selected. The boolean method //isChecked()// returns the current status.+A CheckBox may or may not be selected. The boolean method //isChecked()// returns the current status, with //setChecked(bool)// a value is set.
  
 Example:  Example: 
en/qt.txt · Zuletzt geändert: 2024/05/07 17:09 von roehner