Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

dialog openes several time in MainWindow

$
0
0
hi all, i have the following problem: i have a mainWindow and a .ui form which opens if i press a button in the mainWindow. the .ui form has an OK button and a Cancel button. after i open it 1st time, if i Cancel and re-open, the window will be opened 2 x (two times.) pressing Cancel on both windows, and re-open the form, will open 4 x (four times) same window. closing and opening repetitively will open: number of same windows = 2 x number of previous openings. i Cancel the form with: void newA::on_pushButton_clicked() {    newA::close(); } I think, I’m not sure, but the previous session should be deleted. i found the deleteLater () function for QDialog, but nothing else. and the deleteLater () is not working in my case. any idea how the dialog should be deleted/destroyed? has anyone experienced this situation? much appreciated :)

Viewing all articles
Browse latest Browse all 18427

Trending Articles