Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display window full screen on secondary monitor using Qt

Tags:

qt

Seems to be possible with native controls (see here and here) so now I'm looking for some Qt code to do it.

like image 884
user386576 Avatar asked Jul 08 '10 11:07

user386576


People also ask

Can you play fullscreen with 2 monitors?

When a remote desktop window is open, to extend the remote desktop across multiple monitors, select Window > Enter Full Screen from the menu bar or from the expander arrows in the upper-right corner of the remote desktop window.


1 Answers

I use this code for the second display in full screen successfully on both Windows & Linux

QRect screenres = QApplication::desktop()->screenGeometry(1/*screenNumber*/);
SecondDisplay secondDisplay = new SecondDisplay(); // Use your QWidget
secondDisplay->move(QPoint(screenres.x(), screenres.y()));
secondDisplay->resize(screenres.width(), screenres.height());
secondDisplay->showFullScreen();
like image 191
mmonem Avatar answered Sep 21 '22 03:09

mmonem