Results 1 to 3 of 3

Thread: How to setting Geometry property for a non-parent's QWidget?

  1. #1
    Join Date
    May 2010
    Posts
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default How to setting Geometry property for a non-parent's QWidget?

    Hi, all
    I want setting Geometry property for a non-parent QWidget by setGeometry function, but it's fullscreen always.
    why?
    thanks!
    Best regards


    Mecland

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to setting Geometry property for a non-parent's QWidget?

    I didn't understand the question.

    Do you mean this:

    Qt Code:
    1. QWidget *myWidget = new QWidget;
    2. myWidget->setGeometry(0,0,100,100);
    To copy to clipboard, switch view to plain text mode 

    And this results in a widget that fills the screen?

  3. #3
    Join Date
    May 2010
    Posts
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to setting Geometry property for a non-parent's QWidget?

    thank for your repsone.
    yes, same to that's code

Similar Threads

  1. Replies: 1
    Last Post: 3rd February 2011, 10:38
  2. Replies: 2
    Last Post: 8th May 2010, 21:33
  3. Promoting the parent QWidget of a QWidget form
    By extrakun in forum Qt Tools
    Replies: 6
    Last Post: 16th April 2010, 14:19
  4. GraphicsView: Notifying geometry change to parent group
    By Gopala Krishna in forum Qt Programming
    Replies: 8
    Last Post: 12th August 2007, 12:04
  5. Setting QMessageBox geometry
    By Krish_ng in forum Qt Programming
    Replies: 3
    Last Post: 25th July 2007, 14:47

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.