I have just started Qt widget programming. Part of my first program looks like this
Code:
void MainWindow::numberChanged(){
int numOne=ui->numberOne->text().toInt();
int numTwo=ui->numberTwo->text().toInt();
int addition=numOne+numTwo;
ui->textEdit->setText(QString::number(addition));
}
This void is triggered by a pushbutton. For the line in bold, I want it to ADD to what is already there instead of replacing each time the button is pressed (like the VB textbox1.text=textbox1.text+variable). Oh, and if I just have to read some manual, point one out please. Preferrably on the net.
Not much of a program in itself, but would be useful to know for larger programs.