View Full Version : Large desktop for Multiple Display Monitors
yxtx1984
1st April 2011, 06: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!
mcosta
1st April 2011, 08:37
What is the result of QDesktopWidget::isVirtualDesktop()?
yxtx1984
1st April 2011, 13:56
QDesktopWidget::isVirtualDesktop() returns true, so????
high_flyer
1st April 2011, 14: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.
budda
23rd December 2011, 08:18
try this
QDesktopWidget * desktop = QApplication::desktop();
originalPixmap = QPixmap::grabWindow(desktop->winId(), desktop->x(), desktop->y(), desktop->width(), desktop->height());
Spitfire
23rd December 2011, 10: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.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.