MeVisLab Scripting Reference
|
MeVisLab offers the complete Qt Framework API to the Python programmer.
MeVisLab offers the following Qt bindings located in the PythonQt package:
The individual bindings can be dynamically imported using
or alternatively importing individual classes:
For detailed documentation of the Qt libraries, see http://doc.qt.io/qt-6/reference-overview.html.
There are two possibilities to use QtGui components:
An example of adding Qt widgets via the initCommand of an MDL control:
While trying to be compatible to other Python/Qt binding like PyQt4 and PySide, there are many subtle differences. One major difference is that in MeVisLab, Qt properties are first class citizens and shadow the getter methods, while in PyQt4 and PySide the getters shadow the properties. Basically it should not be much work to get PyQt4 or PySide example to work in MeVisLab, by replacing the imports with PythonQt imports and by changing getter calls to property reads, e.g., w.height() becomes w.height in MeVisLab.