Need a control to show a image and draw on it and scrollable
-
QScrollArea
+QLabel
withQPixmap
for the imageOr have a look at the Graphics View Framework:
There are also some MS Paint-like examples using Graphics View or a plain widget as canvas to draw on:
(Mabye you can use this example as template since it almost does what you want to do)
-
There is no such single widget...
Qt is a programming framework, not plug and play :)
Something (or most of the times) you have to make your own widgets and implement your own behavior to get what you want.I said you could use the scribble example as template, not "take it and you are done". Of course it might need some additional coding to get from it, what you expect.
If you have a canvas widget, where you can draw on, you can put it in a
QScrollArea
and voilĂ , it's scrollable...Btw: You can make a custom and single
QWidget
from any other combination ofQWidgets
, so it can be used and "cloned" multiple times on your GUI. -
@Pl45m4 said in Need a control to show a image and draw on it and scrollable:
If you have a canvas widget, where you can draw on, you can put it in a QScrollArea
Tried: https://forum.qt.io/topic/133473/no-scrollbars-when-put-qwidget-derived-class-object-in-qscrollarea
But scrollbars don't appear, what the problem?