How can I get rid a a part menubar ?

  • !!

    I want to place a push button in the blue circle area
    but I can't. because it have the part of menu bar (like the red circle)
    How can I get rid of the red circle?

    Sorry for bad English,
    Thank you

  • hiii..
    Try to use stylesheet(CSS)

  • I've try it .
    but doesn't work

  • I assume that you use widgets and QMainWindow as a main window of your application.
    You will need to set menu widget in your mainWindow initialization instead of QMenuBar

    In that widget you can add QMenuBar and QToolBar in a horizontal layout with splitter or without.

    Something like this
    widgetCentral = new QWidget(this);

    widgetMenuToolBar = new QWidget(this);
    layoutMenuToolBar = new QHBoxLayout(widgetMenuToolBar);
    spacerLayoutMenuToolBar = new QSpacerItem(20, 20, QSizePolicy::Expanding);
    mainMenuBar = new QMenuBar(widgetMenuToolBar);
    mainToolBar = new QToolBar(widgetMenuToolBar);


    All other UI items will belong to centralWidget.

Log in to reply

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