Utilities
Small helpers for stylesheets and modifier keys.
nodeeditor.utils ¶
Module with some helper functions
loadStylesheet ¶
Loads an qss stylesheet to the current QApplication instance
:param filename: Filename of qss stylesheet :type filename: str Raises: RuntimeError: If no QApplication instance exists
loadStylesheets ¶
Loads multiple qss stylesheets. Concatenates them together and applies the final stylesheet to the current QApplication instance
:param args: variable number of filenames of qss stylesheets :type args: str, str,... Raises: RuntimeError: If no QApplication instance exists
isCTRLPressed ¶
Checks whether the Control key is held down in the given event.
:param event: Qt's mouse or key event
:type event: QEvent
:return: the Control modifier of the event, truthy when the key is held
:rtype: int
isSHIFTPressed ¶
Checks whether the Shift key is held down in the given event.
:param event: Qt's mouse or key event
:type event: QEvent
:return: the Shift modifier of the event, truthy when the key is held
:rtype: int
isALTPressed ¶
Checks whether the Alt key is held down in the given event.
:param event: Qt's mouse or key event
:type event: QEvent
:return: the Alt modifier of the event, truthy when the key is held
:rtype: int