Avoid Mouse pointer flicker while taking screenshot of the entire screen
-
hello ,
I am using the below mentioned method to take screenshot of my screen and as the process is continuous the mouse pointer keeps on flickering, is there any alternative method using which i can take screenshot without causing the mouse pointer to flicker,
Code snipppet used in our case
QImage qimg(QGuiApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId()).toImage());Please suggest any alternative method if possible
-
Hi and welcome
Have you checked if the sample
http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html
also flickers with mouse? -
Hi and welcome
Have you checked if the sample
http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html
also flickers with mouse? -
Hi @jash156 ,
Try this,
QPixmap screenshot;
screenshot = QPixmap::grabWindow(QApplication::desktop()->winId()) ;
screenshot.save(Qstring(_____________.png); -
Hi @jash156 ,
Try this,
QPixmap screenshot;
screenshot = QPixmap::grabWindow(QApplication::desktop()->winId()) ;
screenshot.save(Qstring(_____________.png); -
Hi @jash156 ,
usually, QPixmap::grabWindow does not take cursor or some flickering(as per documentation).
Are you using QgraphicsView or a normal widget like Qdialog /QWidget?
If possible, could you please share code here. so that its easy to find out. -
Hi @jash156 ,
usually, QPixmap::grabWindow does not take cursor or some flickering(as per documentation).
Are you using QgraphicsView or a normal widget like Qdialog /QWidget?
If possible, could you please share code here. so that its easy to find out.hello @Ni.Sumi ,
I am just using the method mentioned by you using a QWidget and sending then sending the screenshot in jpg format over network
and for the code, it is just the first example you gave which i run in a while loop to get continuous screenshot.
-
Hi if you only take picture of you own window, then maybe call
setCursor( QCursor( Qt::BlankCursor ) );
to hide it while sending ? -
From what i know.
Just paint another mouse pointerI think windows OS hides the mouse while taking a capture.
It is something internal.Only option i see is to paint another mouse pointer that Windows will not hide while making the capture call.
Just make a fast check... keep pressing "imp pant" key and look... it is the same effect.