JuPedSim / jpseditor

Editor for the goemetry
Other
4 stars 6 forks source link

Use stacked widget for toolbars #194

Open schroedtert opened 5 years ago

schroedtert commented 5 years ago

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

sainho93 commented 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.

schroedtert commented 5 years ago

As both are inherited from QWidget it should (theoretically) work without problem.