Hi guys,
I have a QMainWindow. In the menuBar 'Edit' I click "show Dock Widget". The dockWidget appears. Now I want to remove the " restore button" just next to "close button". I tried setting the windows flags but was unsuccessful.
Please help me to remove the restore button displayed on dockWidget.
Code:
{ connect(dockAct, SIGNAL(triggered()), this, SLOT(showDockWidget())); fileMenu->addAction(newAct); editMenu->addAction(dockAct); } MainWindow::~MainWindow() {} void MainWindow::showDockWidget() { _dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); _dock->setFloating ( true ); _dock->setWidget( btn_1 ); //setWindowFlags( Qt::WStyle_Customize|Qt::WStyle_Title ); _dock->setGeometry( width()/2, height()/2, 100, 30 ); _dock->show(); }
Thanks

