quite: QT UI Extension for Python3
Features
- powerful signal-slot
- user friendly widget classes
User Friendly Widget Classes
Uniform wrapper on frequently-used widget, including:
container widget:
value widget:
behavior widget:
Container Widget
Example 1: create widget
import quite
w = quite.Widget()
w.exec()
Example 2: nested widget
import quite
class CustomWidget(quite.Widget):
def paint(self, painter: quite.Painter):
painter.setFont(quite.QFont("Courier New", 14.0))
painter.draw_text_bottom_right(quite.PointF(0, 0), "Custom Widget")
painter.end()
main_window = quite.MainWindow()
custom_widget = CustomWidget(parent=main_window)
main_window.set_central_widget(custom_widget)
main_window.exec()
Example 3: widget from ui file
import os
from quite import *
class CustomWidget(Widget):
def paint(self, painter: Painter):
w, _ = self.size
painter.setFont(QFont("Courier New", 14.0))
painter.draw_text_bottom_right(PointF(0, 0), "So Cool!")
painter.draw_text_bottom_left(PointF(w, 0), "From Custom Widget")
painter.end()
main_window = load_ui(filename=os.path.join(os.path.dirname(__file__), 'main_window.ui'))
main_window.set_central_widget(CustomWidget(parent=main_window))
main_window.exec()
Use QtDesigner to create a ui file: