PDA

View Full Version : new design of QDateTimeEdit



Ursa
11th December 2007, 11:28
Hello.
I need a widget like QDateTimeEdit by functionality but a little bit more interesting by design (f.e. like QLCDNumber). I tried to create a new widget based on these classes:

class TLCDDateTimeEdit : public QDateTimeEdit, public QLCDNumber
and get the following message: 'Warning: Class TLCDDateTimeEdit inherits from two QObject subclasses QDateTimeEdit and QLCDNumber. This is not supported!'.
So I wonder if there is any other path to get such a widget?
Thanks in advance. :)

wysota
11th December 2007, 14:13
Hmm... possible ways:
1. Derive from QLCDNumber and implement everything yourself
2. Subclass QDateTimeEdit and reimplement its paint event to do custom painting
3. Subclass QAbstractSpinBox, make QLCDNumber its child and implement everything that needs to be implemented.

In other words - lots of work, so you should consider using stylesheets or forgetting about it instead :)

Ursa
12th December 2007, 07:30
thank for answer.... and I think I'll forget... :( it's too long for me to realize that...