Try creating the quantity dialog with a parent:
void MainWindow::addItem()
{
Quantity qtyObj(this);
QString qty
= qtyObj.
askQuantity();
itm.append(qty);
qtyObj.close();
if(this->is_empty_Input(itm) && !this->is_in_List(itm)){
ui->list_view->addItem(itm);
}
}
void MainWindow::addItem()
{
Quantity qtyObj(this);
QString itm = this->get_input();
QString qty = qtyObj.askQuantity();
itm.append(qty);
qtyObj.close();
if(this->is_empty_Input(itm) && !this->is_in_List(itm)){
ui->list_view->addItem(itm);
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks