I am trying to write a paint program (paint where the mouse click / hold has ever been detected), but I am having problems using Qt QPainter . I read the documentation on my website and I'm still lost. A link to a tutorial that is not located on their website would be nice or maybe explain to me how I can do this in Qt. The only thing I managed to do was draw dots on the widgets.
Check out the Scribble example that comes with Qt, it does exactly what you want.
We override the mouse event handlers to implement the drawing, the handler of the drawing event to update the application, and the resize event handler to optimize the appearance of the application. In addition, we redefine the close event handler to intercept the closing events until the application terminates.This example also shows how to use QPainter to draw a live image, as well as to redraw widgets.
We override the mouse event handlers to implement the drawing, the handler of the drawing event to update the application, and the resize event handler to optimize the appearance of the application. In addition, we redefine the close event handler to intercept the closing events until the application terminates.
This example also shows how to use QPainter to draw a live image, as well as to redraw widgets.
Use QtAssistant and go to the entry in QPainter. From there, you will see links to sample programs using various QPainter functions, such as: http://doc.trolltech.com/4.5/painting-basicdrawing.html
QtAssistant . . , , QtCentre. .
, , , , paintEvent . QPixmap QImage . // . , ( , ). paintEvent, (QPaintEvent:: rect()) .
Source: https://habr.com/ru/post/1722069/More articles:ASP.NET - PDF component in trust tool - asp.netHow to update Java 6 on Mac OS X Snow Leopard - javaRDLC Medium Trust - asp.netHTTP / 1.1 200 OK - apache2designing a backend with mvc framework in php - phpКак Windows переключается в режим супервизора во время системного вызова? - x86Python Tkinter Prompt - pythonTortoiseGit connects to remote git repo (not github) - gitMootools delay problem - javascriptphp: how to check if a string contains any of the listed keywords? - phpAll Articles