Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Design questions for a simple level editor.
WetDesertRock last edited by
I'm wanting to create a simple 2d level editor (basically think an SVG editor for games). The issue I'm having is I'm quite new to Qt so I'm having issues researching this myself. For a proof of concept I want to focus on the most basic aspects. For me initial design is always the hardest part of starting to use a new framework.
I want to be able to:
- Zoom in on the scene
- Pan the scene
- At least 2 tools:
- Add rectangle object tool
- Object select tool
The panel items and selecting between tools seems pretty easy, I'm just not sure about how to draw the scene. I've been told using the new Shapes for 5.10 would be a good place for me to start. I think this is probably right. Using shapes would make it easy to select and draw objects. However I'm not seeing any easy way to scale and pan the scene using Shapes.
From what I understand these are my options for rendering the scene:
- Shapes (Previously recommended)
- GraphicsView (although maybe not the best anymore?)
- QPainter (Not sure I've gotten a great grasp of what exactly this is)
- OpenGL (Familiar with this, but most likely wouldn't get a uniform feel with the rest of the application)
These are the questions I have:
- What would you recommend for rendering the scene? Why?
- What would be a sample widget hierarchy for whatever you suggest? I think this is my main hangup for figuring out how to scale and pan with Shapes.