How to Qt Screen Capture using GrabWindow
I am new to qt and programming world and please help me with this problem. I am runnign Qt on VxWorks and trying to capture Qt Window screen using grabWindow.
below is the function that I used. When I run, it prints the debug msg but does not generate any files.
Please correct me if I made any mistake.
Also how to I change the path where the file is saved?
@void ScanControlInterface::TopDisplay_Capture( )
QPixmap capture = QPixmap::grabWindow(QApplication::desktop()->winId(),0,0,QApplication::desktop()->width(),QApplication::desktop()->height());
qDebug ("ScanControlInterface::Screen captured");