PDA

View Full Version : QDateEdit popup Calendar ::dropdown question



Goodwin
26th September 2014, 08:09
Hi everyone!
I use QDateEdit with CalendarPopup.
When I try to style it, I use this:

QDateEdit::drop-down {subcontrol-origin: padding; subcontrol-position: top right; width: 300px; background: black;}
Question: the background color is working perfectly... why "width" option doesn't do anything?

wysota
27th September 2014, 22:03
Apparently it is not supported.

Goodwin
29th September 2014, 10:02
Apparently it is not supported.
Qt 4.8.4
PyQt 4.9.6

why?
it should work

Ok... then how I can change the width of drop-down button from QDateEdit widget?

wysota
29th September 2014, 10:57
Where in the docs does it say it "should work"? Qt doesn't implement full CSS specs for all controls and subcontrols.

Goodwin
29th September 2014, 12:56
Where in the docs does it say it "should work"?
Even if you're right, there must be a way to change width... or else it's awful

anda_skoa
29th September 2014, 13:35
Directly changing the width maybe?
Or setting a minimum width for it?

Cheers,
_

Goodwin
29th September 2014, 15:22
Where in the docs does it say it "should work"? Qt doesn't implement full CSS specs for all controls and subcontrols.
Ok, well this line from here (http://doc.qt.digia.com/4.6/stylesheet-examples.html#customizing-qcombobox)

QComboBox::drop-down {subcontrol-origin: padding; subcontrol-position: top right; width: 15px;
doesn't work either.
It seems like width options for combobox cannot be styled with css

wysota
29th September 2014, 16:24
Not everything can be done with CSS. You will have to get your hands dirty with C++.