qtqdockwidgettabbing

how to preventoverlapping between two qdockwidgets in same area?


I have two qDockWidgets have the same allowed area ,qt by default allows overlapping between two dock widgets so the two dock widgets will be a one tab widget . I want to stop this behavior


Solution

  • to stop the tabbing between two dock widget add this line of code in your application

    setDockOptions(QMainWindow::AnimatedDocks);
    

    the default value of DockOptions in qt is AnimatedDocks | AllowTabbedDocks