Open schroedtert opened 5 years ago
Drawing tool widget is using QToolBar, zone widget is using QDockWidget, the two classes can be layout automatically, when the main windows layout changed, and they won't cover the drawing area. I'm not sure if QStackedWidget works like them. But I'll make a try.
As both are inherited from QWidget it should (theoretically) work without problem.
Instead of creating widgets for the different toolbars (drawing, zone) and deleting them. The use of a stacked widget may be helpful. Thus, the widgets just need to be created once and can be moved to the foreground if needed. No need for deleting while the program is running.
https://doc.qt.io/qt-5/qstackedwidget.html