Load a designer UI xml file in
Parameters: | ui_path (str) – Path to UI file. ui_path be a partial path relative to the file calling loadUiFile(). It is also not necessary to include the .ui extension. |
---|---|
Returns: | Window Class defined by the input UI file |
Bases: object
Base class for widgets loaded with loadUiType. This class provides convenience functions, and manages a few of the more specific features of the loadUiFile function.
Slight tweak to the default close function, cleans up the window to avoid memory leaking.
Set a new list of managed widgets
Parameters: | widgets (list of QObjects or objectName’s) – Widgets to not manage |
---|
Reset the window to it’s “initial” state from when the UI for was loaded
Parameters: |
|
---|
Show a single instance of this form class, closes any previous instances regardless of reloads All arguments pass through to the base class.
Get the visible instance of this form class. If create is True, and this window does not already exists, it will return the result of showUI with no arguments.
Parameters: | create (bool) – Create this ui if none exists |
---|---|
Returns: | The visible instance if one exists |
Return type: | DesignerForm or None |
Get the currently focused widget
Returns: | Widget with focus currently |
---|---|
Return type: | QtGui.QWidget or None |
Given a path to a qrc file, create the target file This also tries to checkout the file from perforce if it can.
Parameters: |
---|
Utility to convert a pointer to a Qt class instance
Parameters: |
|
---|---|
Returns: | QWidget or subclass instance |
Return type: | QtGui.QWidget |
Utility to convert a Qt class instance to a pointer
Parameters: | obj (Qt Object) – Object to unwrap |
---|---|
Returns: | Unwrapped instance pointer |
Return type: | long |
Check if a widget is valid in the backend
Parameters: | widget – QtGui.QWidget |
---|---|
Returns: | True if the widget still has a c++ object |
Return type: | bool |
Call close and deleteLater on a widget safely.
Note
Skips the close call if the widget is already not visible.
Parameters: | widget (QtGui.QWidget) – Widget to close and delete |
---|
Helper to get a settings object for a given app-name It uses INI settings format for Maya, and registry format for stand-alone tools. Try to ensure that the appName provided is unique, as overlapping appNames will try to load/overwrite each others settings file/registry data.
Parameters: | appName – string – Application name to use when creating qtSettings ini file/registry entry. |
---|---|
Returns: | QtCore.QSettings – Settings object |
Save/Load state for a widget and it’s sub-widgets
Parameters: |
|
---|
How to store/load state for a number of widget types
Parameters: |
---|
Given the name of a Maya UI element of any type, return the corresponding QWidget or QAction. If the object does not exist, returns None
Parameters: | mayaName (str) – Maya name to get a Qt widget for |
---|---|
Returns: | Widget Object |
Return type: | QtCore.QWidget |
Get the maya main window as a QMainWindow instance
Returns: | MainWindow instance |
---|---|
Return type: | QtGui.QMainWindow |
Return the maya full ui path to the given Qt widget
Parameters: | widget (QtGui.QWiget or QtCore.QObject) – Qt widget to get a Maya path for if possible |
---|---|
Returns: | Maya UI path, or None |
Return type: | str |
Take a given QWidget and return it’s Maya UI parent
Parameters: | widget (QtGui.QWidget) – widget to get parent for |
---|---|
Returns: | Parent widget or None |
Return type: | QtGui.QWidget |
Bases: dict
Bases: object
Callback object similar to functools.partial. It bakes arguments at creation time and makes itself callable.
Bases: mlib.core.qt.BaseCallback