kiteh
2018-11-29 02:29:06 UTC
Hi all, I have a .ui file in which I have created some widgets using
qt-designer in a specific order.
Eg.
QFrame
|- horLayout_01
|-|- buttonA
|- horLayout_02
|-|- LabelB
|-|- buttonB
|- horLayout_03
|-|- buttonC
|-|- buttonC
And later on, this particular UI is being called and use together with a
QObject (which is also another UI, but created in pythonic terms), such
that the code looks something like this:
# `mainInfoPanel` is the file that uses .ui file for setting all the
signals within..
# `BasePanel` is the GUI created pythonically
import mainInfoPanel as mainInfoWidget
class infoPanel(BasePanel):
def _build_ui(self, parent):
self._widget = mainInfoWidget(parent)
super(infoPanel, self)._build_ui(parent)
And so, my question here is - will it be possible to reorder the layout of
the .ui file it is reading from under the `_build_ui`?
Eg. to this:
QFrame
|- horLayout_01
|-|- buttonA
|- horLayout_03
|-|- buttonC
|-|- buttonC
|- horLayout_02
|-|- LabelB
|-|- buttonB
qt-designer in a specific order.
Eg.
QFrame
|- horLayout_01
|-|- buttonA
|- horLayout_02
|-|- LabelB
|-|- buttonB
|- horLayout_03
|-|- buttonC
|-|- buttonC
And later on, this particular UI is being called and use together with a
QObject (which is also another UI, but created in pythonic terms), such
that the code looks something like this:
# `mainInfoPanel` is the file that uses .ui file for setting all the
signals within..
# `BasePanel` is the GUI created pythonically
import mainInfoPanel as mainInfoWidget
class infoPanel(BasePanel):
def _build_ui(self, parent):
self._widget = mainInfoWidget(parent)
super(infoPanel, self)._build_ui(parent)
And so, my question here is - will it be possible to reorder the layout of
the .ui file it is reading from under the `_build_ui`?
Eg. to this:
QFrame
|- horLayout_01
|-|- buttonA
|- horLayout_03
|-|- buttonC
|-|- buttonC
|- horLayout_02
|-|- LabelB
|-|- buttonB
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ee8c06f0-9627-4060-993b-80b9959926ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ee8c06f0-9627-4060-993b-80b9959926ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.