Results 1 to 10 of 10

Thread: How to detect multi screen in QT?

  1. #1
    Join Date
    Mar 2010
    Posts
    68
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default How to detect multi screen in QT?

    Which classes help me detect multi screen and show separate widgets on each available screen?

    Help me!

  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: How to detect multi screen in QT?

    What do you mean by screen? Separate .exe files?

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to detect multi screen in QT?

    QDesktopWidget::numScreens
    QDesktopWidget::screenGeometry
    use the above functions to set geometry of the widget, QWidget::setGeometry

  4. The following user says thank you to aamer4yu for this useful post:

    Kevin Hoang (26th March 2010)

  5. #4
    Join Date
    Mar 2010
    Posts
    68
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: How to detect multi screen in QT?

    What do you mean by screen? Separate .exe files?
    No, one or more exe file, rather than is separate tasks on each screen.

  6. #5
    Join Date
    Mar 2010
    Posts
    68
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: How to detect multi screen in QT?

    Thanks to aamer4yu!

    I have new question need help: How to detect monitor type?

  7. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to detect multi screen in QT?

    Monitor type? What do you mean?

  8. #7
    Join Date
    Mar 2010
    Posts
    68
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default How to detect multi screen in QT?

    I'm sorry, I have a mistake.

    I want to detect video display interfaces, such as: DVI, Analog, HDMI. Give me a way to do with QT?

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to detect multi screen in QT?

    There is no way to do it with Qt. I'd even say you have to interface directly with the hardware driver to be able to query for such information. In other words you need to use native API.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. The following user says thank you to wysota for this useful post:

    Kevin Hoang (26th March 2010)

  11. #9
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to detect multi screen in QT?

    Quote Originally Posted by Kevin Hoang View Post
    I want to detect video display interfaces, such as: DVI, Analog, HDMI. Give me a way to do with QT?
    You need to read the EDID from the monitor. There is no platform independant way of doing that.

    On windows, the EDID may be stored in the registry. Monitors are enumerated as the child devices of display adapters. You can find information by reading the 'Monitor' class GUID tree {4d36e96e-e325-11ce-bfc1-08002be10318}, reading the monitor id, and then looking up that id in the DISPLAY section of the Enum section of the current control set.

    For example, I can find the EDID for my primary monitor at HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\DISPL AY\VSCE41B\5&8a4b4de&0&11335587&05&00\Device Parameters, and by looking at byte 20, I can see it's digital.

    Don't depend on this however - the data may not be available for all monitors - Windows will only give you exactly what it retrieves from the monitor itself.

    Furthermore, both HDMI and DVI are digital, so it's a lot more difficult (or impossible? I don't know) to tell them apart.

  12. The following user says thank you to squidge for this useful post:

    Kevin Hoang (26th March 2010)

  13. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to detect multi screen in QT?

    Furthermore EDID will only be reported for adapters that actually have monitors connected to them.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. detect which layer of the screen an application is on
    By solartic in forum Qt Programming
    Replies: 2
    Last Post: 22nd July 2009, 18:05
  2. Display a QWidget using multi-screen
    By tarod in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 15:02
  3. Setting manually cursor position on multi screen systems
    By irreriwan in forum Qt Programming
    Replies: 0
    Last Post: 4th March 2008, 10:47
  4. Detect which OS?
    By December in forum Qt Programming
    Replies: 6
    Last Post: 25th May 2007, 00:01
  5. multi screen
    By Thomas Feldman in forum Qt Programming
    Replies: 5
    Last Post: 9th May 2007, 17:41

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.