Can't reach newly made QLCDNumber

102 Views Asked by At

I was doing some testing with QTimer, within a bigger project, using Qt. I wanted to increment a value every 10 milliseconds and show that on the GUI.

void MainWindow::on_timeout(){
    tmpValue++;
    ui->testValue->display(tmpValue);
}

I copypasted a ui for a old project and added some of my own stuff.

I made the QLCDNumber testValue with a tag behind it saying the same. I expected to see the "testValue" int increase quickly but it did nothing. the weird part is when I replace the

ui->testValue->display(tmpValue);

with

ui->lcdThreshold1->display(tmpValue);

It worked as intended, but of course not with the QLCDNumber I wanted

this works for all QLCDNumbers that I have created in the past, just whenever I add a new one it does not work.

Some things worth noting are that it builds and runs without a problem. Also the "lcdThreshold1" from earlier is red the Qt editor, just like the "ui" bit. Whenever I put the new QLCDNumber there, like "testValue", it stays black and is not a option on the autocomplete.

Thanks in advance for your time!

pastebin of the xml file

0

There are 0 best solutions below