Remove Titlebar DockWidget?
-
So i create my Dockwidgets and allow grouped Dragging: setDockOptions(dockOptions() | QMainWindow::GroupedDragging);
When i have my Dockwidgets tabbed now it always shows the Tab and the dockwidget headderbar. Is there a way to remove the headder bar but still being able to drag the dockwidgets?
Thank you very much :D
//Dockwidgets auf der Linken Seite um die GraphicsItems in Scene zu droppen CustomDockWidgetLeft *LeftDockWidget = new CustomDockWidgetLeft(scene, this); addDockWidget(Qt::LeftDockWidgetArea, LeftDockWidget); //Obers Dockwidget auf der rechten Seite, hält die Listenansicht aller Items in der Scene CustomDockableItemList *DockableListWidget = new CustomDockableItemList(scene, this); addDockWidget(Qt::RightDockWidgetArea, DockableListWidget); //Unteres Dockwidget auf der rechten Seite, hält alle Module und Properties der Graphicsitems DockWidgetModulesMain *DockWidgetMainModules= new DockWidgetModulesMain( scene, this); // Titel für den Tab festlegen DockWidgetMainModules->setWindowTitle("Properties"); addDockWidget(Qt::RightDockWidgetArea, DockWidgetMainModules); DockWidgetMainModules->setFeatures(QDockWidget::DockWidgetMovable| QDockWidget::DockWidgetClosable); // Zweites DockWidget DockWidgetModulesMain *DockWidgetMainModules2 = new DockWidgetModulesMain(scene, this); addDockWidget(Qt::RightDockWidgetArea, DockWidgetMainModules2); DockWidgetMainModules2->setWindowTitle("Workspace"); // Fügt das zweite DockWidget als Tab neben dem ersten hinzu tabifyDockWidget(DockWidgetMainModules, DockWidgetMainModules2); // Setzt die Position der Tabs auf oben setTabPosition(Qt::RightDockWidgetArea, QTabWidget::North);
-
@SGaist was correct with his first answer. The bottom bar is the actual title bar of your dockwidget while the top one is automatically created when having multiple dockwidgets at the same spot.
I don't know if you can remove that, but if you do, you have to find another way to bring the hidden, docked widget back up.
-
Hi,
This tab means that you have several docks in the same space so trying to remove it will also make the other dock inaccessible.
-
Hi,
This tab means that you have several docks in the same space so trying to remove it will also make the other dock inaccessible.
@SGaist But isn't it possible to have something like:
Only those two bars? I've seen that in many applications.
-
My bad, I misunderstood your question.
Did you implement a custom title bar ?
-
@SGaist No its just a tabbified dock widget but when tabbified, one titlebar is redundant.
-
@SGaist No its just a tabbified dock widget but when tabbified, one titlebar is redundant.
Which version of Qt are you using ?
On which OS ?Can you provide a minimal compilable example that shows this behavior ?
-
@SGaist No its just a tabbified dock widget but when tabbified, one titlebar is redundant.
@SGaist was correct with his first answer. The bottom bar is the actual title bar of your dockwidget while the top one is automatically created when having multiple dockwidgets at the same spot.
I don't know if you can remove that, but if you do, you have to find another way to bring the hidden, docked widget back up.
-
@SGaist was correct with his first answer. The bottom bar is the actual title bar of your dockwidget while the top one is automatically created when having multiple dockwidgets at the same spot.
I don't know if you can remove that, but if you do, you have to find another way to bring the hidden, docked widget back up.
-