[Qt-interest] How to change spacing between widgets on QToolBar?

程梁 chengliang.soft at gmail.com
Thu Dec 24 04:18:44 CET 2009


Hi! I want to ask how I can change the spacing between widgets on QToolBar?

Once I used:

bar->setStyleSheet("QToolBar{spacing: 2px;}");

but if this is added the widgets on this bar will not be in middle on
vertical.

Then I used:

bar->setContentsMargins(2, 2, 2, 2);

The same thing happened. It seems that these widgets is on the top of the
bar.

So how can I change the spacing?

Thank you!

-- 
Cheng Liang
from: chengliang.soft at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091224/3cc50f7b/attachment.html 


More information about the Qt-interest-old mailing list