Which output (display) widget are available.
sorry to ask a really simple question: but what if I want to display in a widget a float number produced in my code?
The only thing I find for this is a LCD_display that i don't like much.
Is not there something like a QtLineEdit (same fonts) that does not accept
mouse focus, or keystrokes? (maybe with a grayed out background, but not essential)
I use QtCreator 2.5.2, Qt version is 4.8.6, last one that works in Scientific Linux 6. Going forward from this is quite painful because of upgrading gcc.
@ACalcaterra If your just want to show the value, take a
QLabeland format the float value as string.
QLabel *myLabel = new QLabel(this); myLayout->addWidget(myLabel); myLabel->setText(QString::number(myFloat, 'f', 2));
You probably want
QLabel. It's simplistic, but it's the simplest display widget out there. You can also use a
QLineEditthat has its