Styling a QDateEdit
-
I am attempting to modify a QDateEdit control so that the drop down button is wider. From what I have been researching the following Style Sheet should work
QDateEdit { color: white; background-color: black; } QDateEdit::drop-down { height: 60px; width: 100px; }
I know that width is exaggerated, but I wanted to try and get something. The main QDateEdit is to invert the normal colors, and that shows up as expected in my sample app, the drop down width does not ever seem to change. I added a
background-color: green;
To the drop-down window to see if that would get picked up and it did (after I moved my window instantiation after the style sheet loading). so I have a green drop down button with no visible icon when it is present, but the width still stays the same. That at least implies that the style in being somewhat read.
Any ideas what I am doing wrong ? And how to get it to work.
Thanks,
Dale Pennington -
Hi,
Based on the Sub-controls part, it looks like you have to also set the position related properties and then you can apply the usual box model modifications.