Hi guys, I am making and app to allow users to make some simple network diagrams. The app will allow users to draw simple lines and drag and drop devices.
I have reimplemented the following classes: myScene, myView, myCable, myLine and myRouter. I notice that I mostly instantiate my other objects in myScene and the GUI interacts mostly with myScene. I was wondering if I am doing it wrong without having any inheritance as I frequently encounter situation where I need to connect signal and slot from my other classes to the mainwindow. It got me thinking if my other classes should inherits from myScene class.
E.g. I reimplemented the mouseDoubleClicked() in myCable which is a subclass of QGraphicsLineItem, I wanted it to emit a signal to update a QTreeWidget but I it has not been instantiated and I could not do it. I only instantiate it in myScene class.
Thank you all in advance for any advices.
P.S. I apologise in advance if the question is too simple, I am new to C++ and also QT Programming.
Bookmarks