QML, QT interaction with signal example (using PyQt)
Simple PyQt GUI except for QML type Slider
.
This example uses the qml class such as Slider in the PyQt script by using QQuickView
class of Qt.
Not only that, slider sends the "moved" event when handle being moved as you can see the slider.qml
's code.
PyQt script(main.py
) gets that event and handles it properly. In this case, it changes the QLabel's text.
- PyQt5 >= 5.12 - for using
onMoved
event of QML Slider (supported since QtQuick.Controls 2.2/Qt 5.9)
See more information here about the version of Qt, QtQuick, etc.
git clone https://github.com/yjg30737/qml-qt-signal-interaction-example.git
qt_qml_signal_interaction_example.mp4
Slider's style in this preview is Material.