Results 1 to 7 of 7

Thread: Selecting screen on the application starts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Selecting screen on the application starts

    Hi,

    I have a problem,
    The problem is that "isVirtualDesktop" is returning me true, and the number of screens return me 2.
    Qt Code:
    1. bool b = app.desktop()->isVirtualDesktop(); //true
    2. QWidget* pDesktop0 = app.desktop()->screen(0);
    3. QWidget* pDesktop1 = app.desktop()->screen(1);
    To copy to clipboard, switch view to plain text mode 

    pDesktop0 and pDesktop1 point to the same memory data.
    Òscar Llarch i Galán

  2. #2
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Selecting screen on the application starts

    Hi,

    Finally I solved this problem on Virtual Desktops:

    Qt Code:
    1. QRect qAvGeometry = app.desktop()->availableGeometry(0);
    2. //Move the MainWindow to left by horizontal pixels(horizontal resolution)
    3. mainWindow.move((iScreen-1)*(qAvGeometry.width()+1),0);
    To copy to clipboard, switch view to plain text mode 
    Òscar Llarch i Galán

Similar Threads

  1. QSkinWindows Classes
    By kernel_panic in forum Qt-based Software
    Replies: 45
    Last Post: 20th April 2010, 12:35
  2. Setting manually cursor position on multi screen systems
    By irreriwan in forum Qt Programming
    Replies: 0
    Last Post: 4th March 2008, 09:47
  3. getting problem in running qtopia home screen application
    By afgan_rajesh in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 31st January 2008, 07:01
  4. Replies: 3
    Last Post: 8th December 2006, 18:51
  5. Starting application in full screen
    By safknw in forum Qt Programming
    Replies: 3
    Last Post: 12th May 2006, 18:02

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
  •  
Qt is a trademark of The Qt Company.