Slicer 3D GUI edit
-
Hi to everyone!
This is my very first post in Qt Forum :)
I'm a 3D Slicer user (https://www.slicer.org/) and now me and my team develops a tool that requires some interface modifications. Slicer 3D chiefs told me that all the interface is made by Qt, and can be modified using Python so... This is the idea:
I have a function that creates this: (The text is modified)
For that I use:
def createDockInterface(): # Delete the statusBar to have cleaner view: slicer.util.mainWindow().setStatusBar(None) # Create and name the widget: dock_widget = qt.QDockWidget("ST Assistant v16") dock_widget.setObjectName('SegmentTracerDockWidget') # Add the Welcome text: label = qt.QLabel("Welcome to SegmentTracer. Loading and resampling data") dock_layout = qt.QVBoxLayout() dock_layout.addWidget(label) dock_content = qt.QWidget() dock_content.setLayout(dock_layout) dock_widget.setWidget(dock_content) # Display the widget in bottom left corner: slicer.util.mainWindow().addDockWidget(qt.Qt.LeftDockWidgetArea, dock_widget)
But I would like to move it to here:
At this moment, we can move it dragging the dock but, it would be great if the widget will appear on the top automatically.
Thanks for any help! :)
-
@Santiago_Pendon said in Slicer 3D GUI edit:
it would be great if the widget will appear on the top automatically.
AFAIK there is no way to set a position or order of
QDockWidgets
in someDockArea
.
I think they are ordered the way they are added.
So to have your ownQDockWidget
on top, you have to add it before everything else, which might be tricky.