PDA

View Full Version : QDateEdit popup Calendar ::dropdown question



Goodwin
26th September 2014, 07: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, 21:03
Apparently it is not supported.

Goodwin
29th September 2014, 09: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, 09: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, 11: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, 12:35
Directly changing the width maybe?
Or setting a minimum width for it?

Cheers,
_

Goodwin
29th September 2014, 14: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, 15:24
Not everything can be done with CSS. You will have to get your hands dirty with C++.