Utility functions and classes for Qt4 applicaions.
Functions
StringIO | StringIO([s]) – Return a StringIO-like stream for reading or writing |
actionGroupToMenu(actionGroup, label, mainwin) | |
actionGroupToToolbar(actionGroup, label[, name]) | |
callExpensiveFunc(func, *args, **kwargs) | |
cfgToTextDocument(cfg[, doc]) | |
clearTable(tablewidget) | Remove contents from a table widget preserving labels. |
copySelectedItems(itemview) | Copy selected items of an QAbstractItemView to the clipboard and |
coreprint(obj, printer) | |
exportTable(model[, parent]) | |
geticon(name[, package]) | Build and return requested icon. |
geticonfile(name[, package]) | Return the icon file path. |
getuifile(name[, package]) | Return the ui file path. |
getuiform(name[, package]) | Return the ui form class. |
imgexport(obj[, parent]) | |
modelToCsv(model[, dialect]) | |
modelToIni(model[, section, cfg]) | |
modelToTextDocument(model[, doc]) | |
numpy2qimage(data) | Convert a numpy array into a QImage. |
overrideCursor(func) | |
printObject(obj[, printer, parent]) | |
printPreview(obj[, printer, parent]) | |
selectAllItems(itemview) | Select all items in an QAbstractItemView. |
setViewContextActions(widget) |
Classes
ConfigParser([defaults, dict_type, ...]) |
Remove contents from a table widget preserving labels.
Copy selected items of an QAbstractItemView to the clipboard and also return copied data.
Build and return requested icon.
It is assumed that icon files are located in the “images” subfolder of the package.
See also
Return the icon file path.
It is assumed that icon files are located in the “images” subfolder of the package.
See also
Return the ui file path.
It is assumed that Qt UI files are located in the “ui” subfolfer of the package.
See also
Return the ui form class.
If it is available a pre-built python module the form class is imported from it (assuming that the module contains a single UI class having a name that starts with Ui_).
If no pre-build python module is available than the form call is loaded directly from the ui file using the PyQt4.uic helper module.
Note
in the pyside packege is used to provide bindings for Qt4 then the uic module is not available and only pre-built modules are searched. When pyside is used an ImportError is raised if pre-built forms are not available.
Note
like gsdview.qt4support.getuifile() this function assumes that pre-build form modules and Qt UI files are located in the “ui” subfolfer of the package.