Qt Code:
if ((time.second() % 2) == 0) text[2] = ' '; ui->lcdNumber->display(text);To copy to clipboard, switch view to plain text mode
Am using the code above: Its not displaying the hour,minute and the second together
please help me
Qt Code:
if ((time.second() % 2) == 0) text[2] = ' '; ui->lcdNumber->display(text);To copy to clipboard, switch view to plain text mode
Am using the code above: Its not displaying the hour,minute and the second together
please help me
One QLCDNumber can show one number (int or double) so you must crate a QLCDNumber for each (hour, minute, second) and show them in a QHBoxLayout (or whatever is appropriate for your application)
Hi Gokulnathvc,
From the QLCDNumber documentation I see that.If the displayed value is not a number, the property has a value of 0.
So I don't believe that you can achive what you want only by using one QLCDNumber. Maybe try using 3 objects, one for the hours, one for minutes, and one for seconds.
Regards,
Wladek
Last edited by wladek; 23rd March 2011 at 12:50. Reason: Zlatomir was quicker :)
One second is long, everything longer than two seconds is definitely too long.
Qt Code:
ui->lcdNumber->display(text+":"+text1);To copy to clipboard, switch view to plain text mode
This works very fine...
I was trying to do the same thing a you and I would guess you need to change the number of digits the LCD will show. Somewhere you need to do
The default number of digits for the LCD display is 5.
Zlatomir (19th December 2013)
Bookmarks