|
gqtbuttonswidget
|
This module provides lightweight Qt widgets to present button-like UI controls in a compact form:
GQTButtonsWidget : an icon-based button strip implemented with a QListWidget in icon mode.GQTToggleButtonWidget : a group of checkable QPushButton objects (toggle buttons).These widgets are intended for GUI-thread usage inside Qt applications.
GQTButtonsWidget)The icon-buttons widget uses a QListWidget configured in QListView::IconMode. Each logical button is represented by a QListWidgetItem whose icon is updated based on interaction:
1 : "normal" icon2 : "pressed" iconIcons are loaded by filename convention:
For example, if the base icon is ":/images/firstButton" then the widget will look for:
GQTToggleButtonWidget)The toggle-buttons widget creates one QPushButton per title string, marks it checkable, and arranges buttons either vertically (QVBoxLayout) or horizontally (QHBoxLayout). The widget tracks the last pressed button index and emits a signal whenever that index changes.
This module currently does not define or consume any module-specific option keys.
Notes:
gui, verbosity, and debug), but these widgets themselves do not read options directly.The typical usage pattern is:
buttonPressedIndexChanged()) to react to user interaction.press_button(), reset_buttons()) to drive state from code.The project contains example code demonstrating how to instantiate and display these widgets. Each entry includes a short summary and a small code excerpt.
GQTButtonsWidget, shows it, and exits after a configurable timeout.