Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I get rid a a part menubar ?

How can I get rid a a part menubar ?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 931 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    delio
    wrote on last edited by
    #1

    !http://upic.me/i/4x/2help.png(help)!

    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

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      hiii..
      Try to use stylesheet(CSS)

      Be Cute

      1 Reply Last reply
      0
      • D Offline
        D Offline
        delio
        wrote on last edited by
        #3

        I've try it .
        but doesn't work

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andreyc
          wrote on last edited by
          #4

          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
          @QMainWindow::setMenuWidget(QWidget*)@

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

          Something like this
          @
          widgetCentral = new QWidget(this);
          setCentralWidget(widgetCentral);

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

          @

          All other UI items will belong to centralWidget.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved