Hi all,
I am a complete newb at Qt and i'm trying to create a situation where i can input 2 Qstrings into a ListView and then keep on adding the pair of Qstrings to the list everytime the user clicks a PushButton. I have a ButtonHandler function that allows the Qstrings to be moved to the ListView. The 2 inputs are through 2 separate LineEdits.
The problem I am having is that once the first pair is input into the ListView whenever i change the values in the LineEdits and pres the PushButton the values already in the ListView change, it doesn't add a new pair to the ListView. Can anybody help me to change this (i'm not even sure how the LineEdits are pointing to the List)?
Here is the code from my ButtonHandler function:
void ReceiptProgram::buttonClickHandler()
{
ui->itemLabel->setText(ui->itemLine->text());
ui->priceLabel->setText(ui->priceLine->text());
}
void ReceiptProgram::buttonClickHandler()
{
ui->itemLabel->setText(ui->itemLine->text());
ui->priceLabel->setText(ui->priceLine->text());
}
To copy to clipboard, switch view to plain text mode
Thanks in advance,
Bookmarks