„QT Gui Application“

Can anybody help with Qt GUI application ?? plz write me PM !
Last edited on
GUI! We hates it! We hates it forever!

Do you have any concrete question?

Have you studied the Qt documentation, tutorials, and examples http://doc.qt.io/ ?
Yeap I read a lot of theory but it's not "working" ... I mean I need to make button which can calculate (heatIndex) and that's all..


1
2
3
4
5
6
7
8
9
10
void KaunoKlinikos::Ward()
{
    QString Temperature=ui->textTemp->toPlainText();
            QString Humidity=ui->textHumidity->toPlainText();
            QString HeatIndex=ui->textHeatIndex->toPlainText();
            double HeatIndex=(HeatIndex.toDouble())+(Temperature.toInt()+Humidity.toFloat());
            QString Result;
                Result.sprintf("%f",HeatIndex);
                ui->textResult->setText(Result);
}


I already know that this codewon't work. Just wanna make a few buttons which can calculate some things :D and that's all :D
there are no colours in the code 'cause I changed my language to english :)
Buttons do not calculate. Buttons can send a signal that they have been clicked. The signal can be connected to a "slot" function, which will be executed whenever the signal is emitted.

Ok, we see a function that does calculate something. However, we cannot possibly tell yet what is "not working", because we have seen only one small function. It is hard to say whether even that function does what it logically should.

What is "not working"? No button? No change in ui->textResult on click? Unexpected result? Crash? Fails to compile?
Ok so I have a hospital and there are some rooms... so I made buttons as a rooms.. and when I click on that button I can write temperature and humidity (in the "Text edit") and after this when I know temperature and humidity I can calculate HeatIndex... so how to make code ???
when I click on that button I can write temperature and humidity

What?

That implies that clicking that button is connected to a code that will show a separate dialog that contains (text edit) widgets. In other words that button is not directly involved in any calcuation.

Btw, why "text edit"? There are QSpinBox, QDoubleSpinBox, and QLineEdit widgets. If the input values are numeric, then use a widget that enforces the property.
Topic archived. No new replies allowed.