Results 1 to 10 of 10

Thread: child window with very small size !!!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    24
    Thanked 17 Times in 14 Posts

    Angry child window with very small size !!!

    Hi,

    I have a midi application that create child windows holding a widget

    The problem is that the child windows is always created with the minimum size!



    When it should be something like:




    I am loading the child with:

    Qt Code:
    1. documentWindow *child = createMdiChild();
    2. countries *cnt = new countries(this,database);
    3. child->setCentralWidget(cnt);
    4. child->show();
    5. child->setWindowTitle("Countries Maintenance");
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. documentWindow *MainWindow::createMdiChild()
    2. {
    3. documentWindow *child = new documentWindow;
    4. mdiArea->addSubWindow(child);
    5. return child;
    6. }
    To copy to clipboard, switch view to plain text mode 

    The centralWidget cnt has the size w=508 h=250. Its size policy is fixed.

    Any idea how to correct this so the size of the child matched the size of the centralWidget?

    Thanks!!!

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 86 Times in 81 Posts

    Default Re: child window with very small size !!!

    Two questions:
    1. Do you use Layouts in child widgets?
    2. Do you set the size policy of child widgets?
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    24
    Thanked 17 Times in 14 Posts

    Default Re: child window with very small size !!!

    Do you use Layouts in child widgets?
    No.

    Do you set the size policy of child widgets?
    Yes. Is fixed.

    I also tried to have a main layout in the child window and insert the child widget to the layout but I get the same problem

  4. #4
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 86 Times in 81 Posts

    Default Re: child window with very small size !!!

    It's strange.
    Can you post your code/form ?
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Very small size
    By Xirdus in forum Newbie
    Replies: 4
    Last Post: 11th August 2010, 08:28
  2. Replies: 4
    Last Post: 20th November 2009, 12:25
  3. How to close parent window from child window?
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 14th October 2008, 11:40
  4. Replies: 11
    Last Post: 4th June 2008, 07:22
  5. tool bar icon size looking small???
    By darpan in forum Qt Tools
    Replies: 7
    Last Post: 31st March 2006, 16:38

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.