| 3369 | | /* It seems that Qt4 closes all child widgets if the parent widget get |
|---|
| 3370 | | * closed. So nothing to do here than to call close. */ |
|---|
| 3371 | | |
|---|
| 3372 | | close(); |
|---|
| 3373 | | |
|---|
| 3374 | | /* We have this to test on Windows and Mac or maybe I forgot something, so |
|---|
| 3375 | | * we keep this as a reference: */ |
|---|
| | 3369 | /* First close any open modal & popup widgets. Use a single shot with |
|---|
| | 3370 | * timeout 0 to allow the widgets to cleany close and test then again. If |
|---|
| | 3371 | * all open widgets are closed destroy ourself. */ |
|---|
| | 3372 | QWidget *widget = QApplication::activeModalWidget(); |
|---|
| | 3373 | if (widget) |
|---|
| | 3374 | { |
|---|
| | 3375 | widget->close(); |
|---|
| | 3376 | QTimer::singleShot (0, this, SLOT (tryClose())); |
|---|
| | 3377 | } |
|---|
| | 3378 | else |
|---|
| | 3379 | { |
|---|
| | 3380 | widget = QApplication::activePopupWidget(); |
|---|
| | 3381 | if (widget) |
|---|
| | 3382 | { |
|---|
| | 3383 | widget->close(); |
|---|
| | 3384 | QTimer::singleShot (0, this, SLOT (tryClose())); |
|---|
| | 3385 | } |
|---|
| | 3386 | else |
|---|
| | 3387 | close(); |
|---|
| | 3388 | } |
|---|
| | 3389 | |
|---|
| | 3390 | /* We have this to test on Windows or maybe I forgot something, so we keep |
|---|
| | 3391 | * this as a reference: */ |
|---|