How do I create a scribble area with Qt Designer
-
I am using Qt Designer to create a ui file. I want to add a scribble area but I don't see any scribble widget in the sidebar that I can just drag to add a scribble area. How should I do this?
-
Hi
What is a scribble area ?
There is the example
https://doc.qt.io/qt-5/qtwidgets-widgets-scribble-example.htmlDo you mean how to reuse this or ?
-
I mean how do I do it with Qt Designer?
-
Well the sample is not a plugin so its not available as a widget in Designer.
You will have to add the .cpp and .h files to your project and
then create an instance in code.Or use the promotion feature
https://doc.qt.io/qt-5/designer-using-custom-widgets.htmlThis is a kind of place holder thing. where you then can use a plain QWidget to design with
and then at run time, it will be your custom widget.If this is still not what you want/ask, please take an extra moment to give better details of what you mean
by scribble area and "I mean how do I do it with Qt Designer?" :) -
A scribble area is either based on
QGraphicsView
or you use aQPainter
to paint on your widget directly.
In both ways, you have to configure your wanted behavior inside your code. There is not ready-to-work plugin or widget, that does that. -
Thank you. I will keep that in mind.