60. gui.qtutils — General Qt utility functions.

60.1. Functions defined in module gui.qtutils

gui.qtutils.Size(w)[source]

Return the size of a widget as a tuple.

gui.qtutils.Pos(w)[source]

Return the relative position of a widget as a tuple.

This is the position relative to its parent.

gui.qtutils.relPos(w, parent=None)[source]

Return the position of a widget relative to a parent.

If no parent is specified, it is taken as the GUI main window.

gui.qtutils.absRect(w)[source]

Return the absolute rectangle geometry of the widget as a tuple

Returns:

tuple – (x,y,w,h) where x,y is the position relative to the screen origin.

gui.qtutils.MaxSize(*args)[source]

Return the maximum of a list of sizes

gui.qtutils.MinSize(*args)[source]

Return the maximum of a list of sizes

gui.qtutils.findChild(widget, clas=None, text=None, start=0)[source]

Find a child widget.

Parameters:
  • widget – The parent widget

  • clas – The QWidget class of the child to find. Default is any.

  • text – The text of the child widget. Default is any.

Returns:

widget | None – The first widget matching the specifications.