Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[SOLVED] How can i connect signal from widget which is contained in QMdiSubWindow?



  • Hi.
    I have editor which contain QGraphicsScene and QGraphicsView. This editor is placed into a QMdiSubWindow. Now i need to use signal selectionChanged from QGraphicsScene. I can do something like this:
    @
    void Editor::init() {
    ....
    connect(scene_, SIGNAL(selectionChanged()), this, SIGNAL(selectionInEditorChanged()));
    ....
    }
    @
    But class Editor is used as internal widget in QMdiSubWindow. How can i use signal Editor::selectionInEditorChanged(); from my QMainWindow subclass?


  • Lifetime Qt Champion

    Hi,

    Why not just connect the Editor widget after you created it ? Or are you using a custom QMdiSubWindow ?



  • Thank you, it helped.


Log in to reply