Hello! I'm trying to create an application that needs a toolbar. I'm using Mac and Qt 5.5. I used QToolbar and it looked different to traditional OS X toolbars. Later I found QtMacToolbar class and it works good. Unfortunately I see a problem with buttons. Here is a toolbar from the standard Pages.app:
Снимок Ñкрана 2016-01-30 в 18.01.58.png
As you can see, each button has white rectangle around it. And here is a toolbar created with QMacToolbar:
Снимок Ñкрана 2016-01-30 в 18.04.54.png
As you can see, there is no rectangle and icon looks awful.
Here is the code used to created it:
toolBar = new QMacToolBar(this);
QMacToolBarItem *toolBarItem =
toolBar
->addItem
(QIcon(":/undo.png"),
"foo");
connect(toolBarItem, SIGNAL(activated()), this, SLOT(onBarClick()));
toolBar->attachToWindow(this->window()->windowHandle());
toolBar = new QMacToolBar(this);
QMacToolBarItem *toolBarItem =
toolBar->addItem(QIcon(":/undo.png"), "foo");
connect(toolBarItem, SIGNAL(activated()), this, SLOT(onBarClick()));
toolBar->attachToWindow(this->window()->windowHandle());
To copy to clipboard, switch view to plain text mode
The rectangle seem to be a button, but how can I draw it?
Bookmarks