Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

Simplest approach for drawing simple structures (rectangles, lines) in an application?

$
0
0
Dear all, I am new to Qt and I am a bit confused which class to use for my problem at hand. I want to draw some very simple geometric structures (lines, rectangles) in my window, just like a labyrinth seen from above. Having used the C++ Builder before (previously Borland, now Embarcadero), there my approach was to place a “TImage” in my window, define brush and pen color and then draw onto the TImage’s “TCanvas”. Is there some similar approach in the Qt API? The drawing does not have to be very fast, for the moment simplicity is the main goal. QGraphicsView seems to be overkill for my purpose; first I thought QPicture/QPainter was the way to go, but now I am not so sure about that anymore, since the QPainter approach of recording drawing commands does not quite seem to fit, but maybe I just have to get used to it … Which approach would you recommend? Thanks in advance!

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>