Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

QFileDialog: Close the dialog box opened by getOpenFileName

$
0
0
Hello all I need to programmatically close the dialog box opened by QFileDialog:getOpenFileName. I know the parent window of the dialog. This code not work(dialog box not close): QList<QDialog*> widgets = findChildren<QDialog*>(); QList<QDialog*>::iterator cur = widgets.begin(); QList<QDialog*>::iterator end = widgets.end(); for (;cur != end; ++cur) {  (*cur)->setParent(NULL);  (*cur)->reject(); } I use qt 4.7.4

Viewing all articles
Browse latest Browse all 22112

Trending Articles