View Full Version : insert a QDateEdit in a QComboBox

27th June 2011, 17:32
I have a question:
Is there a possibility to add a QDateEdit to a QComboBox?
I want to add some Strings and at the end a QDateEdit?

thank u!

Santosh Reddy
27th June 2011, 18:09
Here look at this post (http://www.qtcentre.org/threads/42651-QCheckBox-as-item-of-QComboBox)

27th June 2011, 20:25
thank u

I use the code, but what I have to do with the paintEvent?

Santosh Reddy
27th June 2011, 20:56
Implement paintEvent if you want custom rending, else leave it.

28th June 2011, 09:51
ok, but there is no Content Type for a QDateEdit.
Can you give me a hint?


Santosh Reddy
28th June 2011, 10:37
You may need to use drawComplexControl() using QStyle::CC_ComboBox, or QStyle::CC_SpinBox, based on type of style used