merry
27th February 2012, 05:55
Hi
I am using Qt4.6.4 on mac os.
I used QToolBar with setUnifiedTitleAndToolBarOnMac = true.
I want to align widgets on right side of the QToolBar, So i used QSpacer like this
QWidget* spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
// toolBar is a pointer to an existing toolbar
toolBar->addWidget(spacer);
toolBar->addAction("Right-aligned button");
It aligns all widgets and actions on the right side. But when i move my QMainWindow (when my cursor on ToolBarArea) like on spacer that i added then (TitleBar and ToolBar) of QMainWindow enters inside the desktop screen.
But when i used setUnifiedTitleAndToolBarOnMac = false. Then it works fine.
What should i do using setUnifiedTitleAndToolBarOnMac = true, my mainwindow not enters into desktop Area..
Thanks
I am using Qt4.6.4 on mac os.
I used QToolBar with setUnifiedTitleAndToolBarOnMac = true.
I want to align widgets on right side of the QToolBar, So i used QSpacer like this
QWidget* spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
// toolBar is a pointer to an existing toolbar
toolBar->addWidget(spacer);
toolBar->addAction("Right-aligned button");
It aligns all widgets and actions on the right side. But when i move my QMainWindow (when my cursor on ToolBarArea) like on spacer that i added then (TitleBar and ToolBar) of QMainWindow enters inside the desktop screen.
But when i used setUnifiedTitleAndToolBarOnMac = false. Then it works fine.
What should i do using setUnifiedTitleAndToolBarOnMac = true, my mainwindow not enters into desktop Area..
Thanks