Results 1 to 3 of 3

Thread: app to cover both monitor screens on ubuntu nvidia dual-monitor setup?

  1. #1
    Join Date
    Jun 2008
    Posts
    49
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default app to cover both monitor screens on ubuntu nvidia dual-monitor setup?

    I'm trying to make a Qt app cover both monitor screens in a dual screen setup. The idea is to simply use

    Qt Code:
    1. move(0, 0);
    2. 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:

    Qt Code:
    1. $ xdpyinfo | grep dimensions
    2. dimensions: 3840x1080 pixels (1016x286 millimeters)
    To copy to clipboard, switch view to plain text mode 

    while for the following, I get:

    Qt Code:
    1. std::cout << "screen 0: " << QApplication::desktop()->screenGeometry(0).width() << std::endl;
    2. std::cout << "max size: " << view.maximumSize().width() << std::endl;
    3. std::cout << "max viewport: " << view.maximumViewportSize().width() << std::endl;
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. screen 0: 1920
    2. max size: 16777215
    3. 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

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: app to cover both monitor screens on ubuntu nvidia dual-monitor setup?

    Looks like your configuration is two screens, each mapping to one physical screen.

    If I remember correctly there is an Nvidia tool that allows you to tell the driver to make it one big screen instead

    Cheers,
    _

  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: app to cover both monitor screens on ubuntu nvidia dual-monitor setup?

    Is Xinerama used on your X?
    What does QDesktopWidget::isVirtualDesktop() return?
    Have a look at QX11Info class - maybe it can offer you some functions that might help.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 0
    Last Post: 18th March 2014, 09:59
  2. Qt way of powering up the monitor
    By HeReSY in forum Qt Programming
    Replies: 0
    Last Post: 10th December 2012, 11:46
  3. QT on LCD monitor
    By Ratheendrans in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 5th March 2011, 17:03
  4. X Monitor in a Qt form
    By prasenjit in forum Qt-based Software
    Replies: 1
    Last Post: 29th April 2010, 07:58
  5. Qt system monitor?
    By khopper in forum Qt Programming
    Replies: 2
    Last Post: 7th November 2008, 16:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.