PDA

View Full Version : QComboBox drop down button outside combo box frame



Dmitry_1
7th March 2012, 06:07
Hi All,

I'm trying to go outside combo box frame with this (see below) CSS Qt style sheet code.

7474

All success except padding, you can see it on picture ( figure 3 ).

Any suggestion ?
Thank you

p.s
How to reproduce: http://pastebin.com/4ZiYRUmB



QComboBox#tab_combo {
margin: 0 26px 0 0; /* make room for the arrow */
padding: 2px 1px 2px 1px;
min-width: 19px;
min-height: 14px;
max-height: 14px;
width: 40px;
height: 14px;
//...strip
}
QComboBox#tab_combo::drop-down {
subcontrol-origin: margin;
subcontrol-position: center right;

width: 19px;
min-width: 19px;
max-width: 19px;

height: 14px;
min-height: 14px;
padding: 0;
margin: 0;

border: 1 solid #515151;
}

QComboBox#tab_combo::down-arrow {
image: url(:/combo_arrow.png);

min-width: 19px;
max-width: 19px;
width: 19px;

min-height: 14px;
max-height: 14px;
height: 14px;
}

Dmitry_1
7th March 2012, 14:13
I have found workaround:



padding: 2 -19px 2 1;
width: 59px;

If somebody knows better solution do not hesitate :) write down it here