View Full Version : Large desktop for Multiple Display Monitors
1st April 2011, 07:39
There are two ways that multiple monitors may be used: as one large desktop or as a number of independent displays. When used as one large desktop, the monitors create more screen space for applications.
So how can i detect that the desktop is whether make up of multiple monitors or just one monitor? QApplication::desktop()->screenCount() just return 1 for both case.
Is Qt support that? or have to use native API?
Thanks in advance!
1st April 2011, 09:37
What is the result of QDesktopWidget::isVirtualDesktop()?
1st April 2011, 14:56
QDesktopWidget::isVirtualDesktop() returns true, so????
1st April 2011, 15:05
In a virtual desktop you have only one screen, that starches over multiple hardware monitors.
virtualDesktop : const bool
This property holds if the system manages the available screens in a virtual desktop.
For virtual desktops, screen() will always return the same widget. The size of the virtual desktop is the size of this desktop widget.
23rd December 2011, 09:18
QDesktopWidget * desktop = QApplication::desktop();
originalPixmap = QPixmap::grabWindow(desktop->winId(), desktop->x(), desktop->y(), desktop->width(), desktop->height());
23rd December 2011, 11:37
Or check width to height ratio.
If it's huge - you have a multiple screen desktop (or veeeery odd screen) :)
Powered by vBulletin® Version 4.1.9 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.