qthelpers

The guidata.qthelpers module provides helper functions for developing easily Qt-based graphical user interfaces.

guidata.qthelpers.is_dark_mode()[source]

Return True if current color mode is dark mode

guidata.qthelpers.win32_fix_title_bar_background(widget)[source]

Fix window title bar background for Windows 10+ dark theme

guidata.qthelpers.text_to_qcolor(text)[source]

Create a QColor from specified string

guidata.qthelpers.create_action(parent, title, triggered=None, toggled=None, shortcut=None, icon=None, tip=None, checkable=None, context=1, enabled=None)[source]

Create a new QAction

guidata.qthelpers.create_toolbutton(parent, icon=None, text=None, triggered=None, tip=None, toggled=None, shortcut=None, autoraise=True, enabled=None)[source]

Create a QToolButton

guidata.qthelpers.create_groupbox(parent, title=None, toggled=None, checked=None, flat=False, layout=None)[source]

Create a QGroupBox

guidata.qthelpers.keybinding(attr)[source]

Return keybinding

guidata.qthelpers.add_separator(target)[source]

Add separator to target only if last action is not a separator

guidata.qthelpers.add_actions(target, actions)[source]

Add actions (list of QAction instances) to target (menu, toolbar)

guidata.qthelpers.mimedata2url(source, extlist=None)[source]

Extract url list from MIME data extlist: for example (‘.py’, ‘.pyw’)

guidata.qthelpers.get_std_icon(name, size=None)[source]

Get standard platform icon Call ‘show_std_icons()’ for details

class guidata.qthelpers.ShowStdIcons(parent)[source]

Dialog showing standard icons

guidata.qthelpers.show_std_icons()[source]

Show all standard Icons