PDA

View Full Version : QLCDNumber problem



ale301168
11th November 2009, 22:07
Dear everybody,

I would like to write a class which is able to show a LCD number
and some text outside the LCD number frame. Since I want to
handle only one class to do that, my class is derived from
QLCDNumber and I've reimplemented its paint event in order to
draw the text. The LCD number shows correctly since my first
instruction of the reimplemented paint event is
QLCDNumber::paintEvent (event), but I'm not able to see
the text because the QLCDNumber's paint device doesn't
draw outside its area.

Is my assumption correct ? Could you suggest me a way to draw
my text ?

Best Regards

Lykurg
11th November 2009, 22:16
reimp sizeHint() and add there the space you need to draw. Or simply make a class which consists of a label and lcd number arranged in a layout. Provide some setter and getter functions and all is fine.