Hello all,
I am trying to capture a screenshot of my Application in a QPixmap and then save it to a QIODevice. But it's giving segmentation fault.
Not able to figure out why.
Here's the code-
Qt Code:
ui.myLabel->setPixmap(pix); //This is fine. Displays the Screenshot ui.myLabel->setScaledContents(true); QByteArray bArray; qDebug()<<"before"; pix.save(&buffer); //Gives SEGV Error qDebug()<<"after"; buffer.close();To copy to clipboard, switch view to plain text mode
Not able to figure out what the problem is.
Bookmarks