Results 1 to 8 of 8

Thread: toolbox

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    53

    Default Re: toolbox

    Thanks, this seem works; but return height 704 instead of 768; the task Bar or window isn't included in height...How can I do? Thanks
    Qt Code:
    1. QRect rect = qw->availableGeometry(0);
    2. std::cout << "Screen Width: " << rect.width() << endl;
    3. std::cout << "Screen Height: " << rect.height() << endl;
    To copy to clipboard, switch view to plain text mode 
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 27 Times in 27 Posts

    Default Re: toolbox

    Use QScreen instead QDesktopWidget
    a life without programming is like an empty bottle

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

    Default Re: toolbox

    Quote Originally Posted by mickey
    Thanks, this seem works; but return height 704 instead of 768; the task Bar or window isn't included in height...How can I do?
    Qt Code:
    1. QRect rect = qw->screenGeometry(0);
    2. std::cout << "Screen Width: " << rect.width() << endl;
    3. std::cout << "Screen Height: " << rect.height() << endl;
    To copy to clipboard, switch view to plain text mode 

    The docs say:

    const QRect & QDesktopWidget::availableGeometry ( int screen = -1 ) const
    Returns the available geometry of the screen with index screen. What is available will be subrect of screenGeometry() based on what the platform decides is available (for example excludes the Dock and Menubar on Mac OS X, or the taskbar on Windows).
    See also screenNumber() and screenGeometry().

Similar Threads

  1. Replies: 5
    Last Post: 30th March 2007, 18:46
  2. Creating a popup toolbox
    By Jachyra in forum Qt Programming
    Replies: 5
    Last Post: 18th February 2007, 11:23
  3. Replies: 1
    Last Post: 5th November 2006, 23:50
  4. put a toolbox
    By mickey in forum Newbie
    Replies: 4
    Last Post: 27th August 2006, 15:35
  5. QGLWidget, toolbox and paintGL()
    By mickey in forum Qt Programming
    Replies: 3
    Last Post: 21st March 2006, 01:05

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.