PDA

View Full Version : MacOS and QToolBar?



Dale
15th September 2008, 11:24
Hello

I have a issue while using QToolBar on my Mac, I'm using the


setUnifiedTitleAndToolBarOnMac(true);

command to get the QToolBar to look like the normal Mac Toolbars, but it never comes out the way it is normaly on the Mac, the QToolBar is always a bit too big, anyone seen this issue before?
It looks like there is a extra margin below the text.
Any suggestions on how to shrink the QToolBar down to the standard Mac size?

Thanks for any help.
//Daniel

kemp
16th September 2008, 06:58
Hi!

Maybe setting the icon size will help.

setIconSize ( const QSize & iconSize )

Dale
16th September 2008, 07:03
Hi

I tried that, the whole size of the toolbar gets smaller, but then it looks really strange, because the empty margin around the text is still really big and the icon is quite small, looks even more strange.

What I have been trying now is to skip the QToolButton and create my own QWidget with a QLabel below, because then you can change the margin of the QLabel and get it sort of right, but I need to create my own Button widget that behaves the same way Mac does with the buttons, it's a lot of code to do all that sadly.

ulmly
21st May 2009, 20:47
I have similar problem with Qt 4.5.

Any idea ?

Dale
26th May 2009, 06:45
No, I haven't sadly found a way to get around this problem.