Results 1 to 4 of 4

Thread: A window on the bottom right of the screen...

  1. #1
    Join Date
    Feb 2007
    Posts
    158
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    25

    Default A window on the bottom right of the screen...

    Hello,

    I would like to display a small window on the bottom right of the screen, il order to simulate a bubble on a TrayIcon (The Qt 4.2.2 TrayIcon have some bugs on Win2000, and they don't display de bublles correctly).

    The idea would be to get the screen current resolution, in order to move the window at the appropriated coordinates (scree resolution - window size).
    I've search on many forums, but I can't see how to get the screen current resolution...
    And I don't know where to search .
    I had a look to QtDesigner, in order to see if there isn't a property for my window that would anchor it on the bottom right, but there isn't .

    Perhaps I could use the window that hold my TrayIcon and maximise it. The window size would give me the screen resolution... I think.

    Have you got another idea ?

    Thanks a lot .

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: A window on the bottom right of the screen...

    Maybe QDesktopWidget helps.
    J-P Nurmi

  3. #3
    Join Date
    Feb 2007
    Posts
    73
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    11
    Thanked 5 Times in 5 Posts

    Default Re: A window on the bottom right of the screen...

    QApplication::desktop()->screenGeometry(0) will give you the geometry of the screen. In X11, "0" is the display :0, you can pass 1, 2, however many displays you have.

    HTH,
    Susan

  4. #4
    Join Date
    Feb 2007
    Posts
    158
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    25

    Default Re: A window on the bottom right of the screen...

    Thanks, I think this is the best solution

Similar Threads

  1. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 09:41
  2. Move window in Clone Mode
    By ultrabrite in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2006, 19:22
  3. how to display a window full screen??
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2006, 13:07
  4. positioning a window at a specific screen position
    By nupul in forum Qt Programming
    Replies: 3
    Last Post: 29th March 2006, 21:21
  5. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 11:21

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.