Save Graphic scene in Database
-
Hi
this show to save load image to db
https://wiki.qt.io/How_to_Store_and_Retrieve_Image_on_SQLitefor the lines, u need to store x1,y1,x2,y2 and maybe color etc.
-
@M4RZB4Ni
well , is that not just 4 ints/floats ?
for start x,y and end x,y ?
You need to save color or anything else?u can use
http://doc.qt.io/qt-5/qgraphicslineitem.html#lineto get the points.
-
@M4RZB4Ni
ok, if that is what u wish.
The lines will no be lines then , when u load it again.
they will be part of imageEverything u need for screen capture is here
http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html -
@M4RZB4Ni
hi
the core is
originalPixmap = screen->grabWindow(0);ยจso you can grab any widget or window this way.
If you need only a subset of widget, then grab whole widget
and cut the pixmap to the wanted size using
http://doc.qt.io/qt-4.8/qpixmap.html#copy