I'm trying to make a Qt app cover both monitor screens in a dual screen setup. The idea is to simply use
move(0, 0);
resize(2*1920, 1080);
move(0, 0);
resize(2*1920, 1080);
To copy to clipboard, switch view to plain text mode
calls to the main window, where each of my screens is of 1920x1080 resolution.
On Windows, this achieves the desired result, but on Linux, the size of the window is always limited to a single screen.
I wonder how to solve this issue?
xdpyinfo reports the combined screen size:
$ xdpyinfo | grep dimensions
dimensions: 3840x1080 pixels (1016x286 millimeters)
$ xdpyinfo | grep dimensions
dimensions: 3840x1080 pixels (1016x286 millimeters)
To copy to clipboard, switch view to plain text mode
while for the following, I get:
std
::cout <<
"screen 0: " <<
QApplication::desktop()->screenGeometry
(0).
width() << std
::endl;
std::cout << "max size: " << view.maximumSize().width() << std::endl;
std::cout << "max viewport: " << view.maximumViewportSize().width() << std::endl;
std::cout << "screen 0: " << QApplication::desktop()->screenGeometry(0).width() << std::endl;
std::cout << "max size: " << view.maximumSize().width() << std::endl;
std::cout << "max viewport: " << view.maximumViewportSize().width() << std::endl;
To copy to clipboard, switch view to plain text mode
screen 0: 1920
max size: 16777215
max viewport: 640
screen 0: 1920
max size: 16777215
max viewport: 640
To copy to clipboard, switch view to plain text mode
this is on ubuntu 14.04 64 bit, with an nvidia GTX760 card, using the latest nvidia factory drivers
Bookmarks