built1n
built1n

Reputation: 1546

What is that cursor-like thing at the top of a Qt MainWindow?

What is the circled part of the application called? screenshot

How can I get rid of it?

Upvotes: 1

Views: 175

Answers (1)

Shf
Shf

Reputation: 3493

It is default toolbar (It is created automatically if your mainwidget is QMainWindow and you have ui form with it). To get rid of it, do something like this:

look at class diagram, when editing your *.ui file and remove QToolBar, named mainToolBar by default, like here -enter image description here.

or you can use void QMainWindow::removeToolBar ( QToolBar * toolbar ) - docs

or you can just hide through css or any means possible ( mainToolBar->hide() )

mainWindow->setStyleSheet( "QMenuBar { border: none } QToolBar { border: none }" );
// or
toolBar->setStyleSheet( "border: none" );
menubar->setStyleSheet( "border: none" );

Upvotes: 4

Related Questions