The QDesktopWidget only gives you information on the screens available. If you query for the QRect of the second screen with QDesktopWidget::screenGeometry() and then use QWidget::move() on your main window to put it within that geometry does that work?
Another observation; the screens are almost certainly numbered from 0, so your second screen's index will be 1 not 2. Further, if Windows is treating your two screens as one virtual desktop you may only get one screen out of QDesktopWidget.
Bookmarks