LucaDanieli
16th February 2017, 19:22
I have an application with many windows (QWidgets).
Particularly, each of these windows is called here SubWindow. Every SubWindow class contains a layout with a MultiEditor *sEditors, which has a menu with an action that closes the current window. Every SubWindow is created within the MainWindow.
In the SubWindow constructor I have:
connect(sEditors, SIGNAL(closeWindow()), this, SLOT(close()));
connect(this, SIGNAL(destroyed()), mainWindow, SLOT(closeWindow()));
The code actually works, as the slot closeWindow() is triggered. But the SubWindow doesn't disappear and remains visible.
Has anybody something to suggest me? I don't understand what actually the problem is (neither hide() seems to work).
Thanks!
Particularly, each of these windows is called here SubWindow. Every SubWindow class contains a layout with a MultiEditor *sEditors, which has a menu with an action that closes the current window. Every SubWindow is created within the MainWindow.
In the SubWindow constructor I have:
connect(sEditors, SIGNAL(closeWindow()), this, SLOT(close()));
connect(this, SIGNAL(destroyed()), mainWindow, SLOT(closeWindow()));
The code actually works, as the slot closeWindow() is triggered. But the SubWindow doesn't disappear and remains visible.
Has anybody something to suggest me? I don't understand what actually the problem is (neither hide() seems to work).
Thanks!