- First QT Graphical interface.
- Calculation checker.
- Multiplication, sum, subtraction.
void MainWindow::on_ObjectName_clicked()
{
//Action
}
ui->ObjectName->setText("Text");
ui->ObjectName->setNum("Text");
- setText("Text")
- receives QString as argument and set objects text.
- setNum(num)
- receives a number and converts it to string to set objects text.
ui->label->setText("Text");
- ui is a user interface pointer.
- label is the label object from the interface.
- "label" is the previously set objectName.
- setText sets the the "label" text.
QString str = ui->input->text();
- . . .->text()
- Returns the text available in "Line Edit".
- Returns text as a "QString";
- QString str = . . .
- QString is a "string" class from QT.
- "QString str;" creates a QString called str.