Making screenshot of a primary screen on openSUSE 12.3, Qt 4.8.4[SOLVED]
how to make a screenshot only of a primary screen?
Use QDesktopWidget::screen to get a widget of the screen in question. Create a QPixmap or a QImage, which ever one works for you. Then use QWidget::render to draw onto your image.
@auto const & primary_scr = QApplication::desktop()->screen(QApplication::desktop()->primaryScreen());
Does not work. Empty image is made this way.
@auto const & primary_scr_raw_ptr = QApplication::desktop()->screen(QApplication::desktop()->primaryScreen());
However, when using virtual desktops it doesn't!