[Solved] reduce space-size of buttons
-
Hello,
look at the pictures here:
[url]http://ubuntuone.com/6rpPTkQeIauvyZQhMoUh0p[/url]
[url]http://ubuntuone.com/47k64UGZRjpzVL0aEkADay[/url]as you can see i have some buttons and i want to reduce the space between them, in the second picture you can see that the button get the most space...
i have created the button with this code (example for play button) :
@mplay_pauseButton.setIcon(mplayIcon);
mplay_pauseButton.setIconSize(mplayPixmap.rect().size());
mplay_pauseButton.setFlat(true);@ were mplayPixmap is the pixmap with the iconany idea how to reduce the space?
-
If you have put the buttons into a layout, try to reduce the spacing and/or contents margins of the layout:
@
layout->setSpacing(0);
layout->setContentsMargins(0, 0, 0, 0);
@ -
i did it but the result is the same...
-
Try to use QSize function and fix the values for HEIGHT and WIDTH.
#include <QSize>
QSize::QSize ( int width, int height ) -
i used QToolButton and the size of the buttons reduced! i'll marked it as solved