DynamicLayoutViaPython

Merged
#45 · Created  · Last updated

Merged pull request

Merged in DynamicLayoutViaPython (pull request #45)

c255985·Author: ·Closed by: ·2020-09-10

Description

By this pull request, layouts (derived from QLayout) in custom user interfaces can also be accessed via the attribute operator (dot-operator) of the class :py:ref:`~itom.uiItem`. Many public methods of these layouts are now wrapped by the itom slot wrapper and can be accessed via the :py:meth:`~itom.uiItem.call` method.

It is now possible to access widgets in a layouts by its position, change some properties of the layouts, remove widgets from a layout as well as add new widgets to a layout. It is further possible to add the content of another ui file to the layout of another ui instance.

The documentation has been adapted to these new functionalities. The entire documentation of
creating custom user interfaces is improved by this pull request. There are many demo scripts
in the demo/ui/dynamicLayouts folder.

Further improvement: Accessing widgets by the attribute-operator (dot-operator) of the class uiItem is now faster than before, since the attributes __dict__ and __slots__ are requested very
often by Python, however __slots__ was not handled yet, such that every request of the __slots__ attribute made an invokeMethod call to another thread to check if there is a child-widget with this name.

first methods added to widgetWrapper such that widgets in QLayout or derived classes can be requested from Python via uiItem.call. More methods must be added to also insert or add new widgets.

0 attachments

0 comments

Loading commits...