cic
29th July 2013, 10:10
Hi,
How can I avoid this line when adding QToolBar into mainwindow?
seems that there contains 2 tool bar?
QToolBar* toolBar = new QToolBar(this);
toolBar->setGeometry(0,0,200,20);
this->addToolBar(toolBar);
9375
Added after 1 31 minutes:
It seems that when one QMainWindow is created,
there is already one default ToolBar inside of it.
<QToolBar*> bars = this->findChildren<QToolBar*>();
I get one tool bar element without calling addToolBar function...
But somehow I dont find similar functions like QMainWindow::menuBar() or QMainWindow::statusBar()...
How can I avoid this line when adding QToolBar into mainwindow?
seems that there contains 2 tool bar?
QToolBar* toolBar = new QToolBar(this);
toolBar->setGeometry(0,0,200,20);
this->addToolBar(toolBar);
9375
Added after 1 31 minutes:
It seems that when one QMainWindow is created,
there is already one default ToolBar inside of it.
<QToolBar*> bars = this->findChildren<QToolBar*>();
I get one tool bar element without calling addToolBar function...
But somehow I dont find similar functions like QMainWindow::menuBar() or QMainWindow::statusBar()...