akos.maroy
28th April 2014, 17:12
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);
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)
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;
screen 0: 1920
max size: 16777215
max viewport: 640
this is on ubuntu 14.04 64 bit, with an nvidia GTX760 card, using the latest nvidia factory drivers
move(0, 0);
resize(2*1920, 1080);
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)
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;
screen 0: 1920
max size: 16777215
max viewport: 640
this is on ubuntu 14.04 64 bit, with an nvidia GTX760 card, using the latest nvidia factory drivers