Invalid use of non-static member function
Solved
General and Desktop
-
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. -
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.