poporacer
7th January 2011, 05:57
I have a widget with a QLCDNumber that I can't get to display anything. The form was created using Creator and in the constructor for the form, I want to initialize the number. I have read throught the forum and documentation and it should work...not sure why. From what I read, I think that QLCDNumber can take a double or string value. I tried several variations just to get it to work and none of them worked.
here is the code
Timer::Timer(QWidget *parent) :
QWidget(parent),
ui(new Ui::Timer)
{
ui->setupUi(this);
ui->lcdDisplay->display(2345);
//ui->lcdDisplay->display("2345");
//ui->lcdDisplay->display(1234.5);
}
I was looking at this too long...I had a function call later on in the code for initializing everything and it set the number to 0...
here is the code
Timer::Timer(QWidget *parent) :
QWidget(parent),
ui(new Ui::Timer)
{
ui->setupUi(this);
ui->lcdDisplay->display(2345);
//ui->lcdDisplay->display("2345");
//ui->lcdDisplay->display(1234.5);
}
I was looking at this too long...I had a function call later on in the code for initializing everything and it set the number to 0...