Placing widget below dock area in MainWindow.

  • A bit of a strange one, I want a window to be structured as follows:


    The important bit being the widget that sits below the docking are. How can I achieve this?

  • There are some possibilities:

    You could create a custom status bar for that, use a non movable bottom tool bar, create a doc widget that is not undocable, ...

    Does one of this solve your problem?

    MySpecialToolBar p = new MySpecialToolBar(this);
    addToolbar(Qt::BottomToolBarArea, p);

    same works with DockWidgets:

    MySpeciaDockWidget p = new MySpeciaDockWidget(this);
    p->setAllowedAreas (Qt::BottomDockWidgetArea);
    p->setFeatures(QDockWidget::DockWidgetVerticalTitleBar); // no move, no float, no close!
    addDockWidget(Qt::BottomDockWidgetArea, p, Qt::Horizontal);

  • Thanks for the reply, I went with the extra dock. I did do a couple of extra things though.

    First, remove the title bar:

    @fixedDock->setTitleBarWidget(new QWidget());@

    Second, fix the height:


    Third, make the other docks not stack with this one:

    @anotherDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);@

  • Hi,

    it should also be possible, to remove the title bar with:


    instead of

  • Nope, I tried that. You still get a title bar, but no close/minimise/float buttons. My method completely removes the title bar. The window, as of now, looks like this:


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.