Solved Invalid use of non-static member function
-
Hi i am doing one little example to capture some pictures improved by me.
QPixmap captura;
captura = QScreen::grabWindow(QApplication::desktop()->winId());
But show me this:
invalid use of non-static member functionI think QApplication::desktop()->winId() is outdate?
Bye. -
grabWindow is not a static function of QScreen. hence the error.
you need to get the screen from the application object and then grab it.
-
@Jeronimo
To add to @kenchan here is a link to QScreen documentation and there is actually an example available. -
Solved thx for the documentation!