Results 1 to 8 of 8

Thread: size of Mainwindow Shrinks when i call it from a Dialog

  1. #1
    Join Date
    Nov 2010
    Posts
    30
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default size of Mainwindow Shrinks when i call it from a Dialog

    Hello Friends ,I have written the code to call a mainwindow from a dialog on pushbutton click as below

    Qt Code:
    1. void Dialog1::on_pushButton_2_clicked()
    2. {
    3. MainWindow *b=new MainWindow;
    4. b->showMaximized();
    5. }
    To copy to clipboard, switch view to plain text mode 
    and i can go to the mainwindow but the size (layout) is changing,I dont know how to solve this,so please help me out


    regards
    ranjit

  2. #2
    Join Date
    Oct 2010
    Posts
    55
    Thanks
    1
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    9

    Default Re: size of Mainwindow Shrinks when i call it from a Dialog

    Not sure what you want to achieve but if you want to show the widget in full-screen mode, you can instead use:

    Qt Code:
    1. b->showFullScreen();
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: size of Mainwindow Shrinks when i call it from a Dialog

    so please help me out
    Sure. It is self-evident that if you resize a window that its size and layout will change, so a literal reading of what you wrote is clearly not a description of a problem. Try to provide sufficient information so that someone who cannot see your screen, and has no idea what your layouts contain, has more than a vague idea what you mean by "i can go to the mainwindow but the size (layout) is changing".

  4. #4
    Join Date
    Nov 2010
    Posts
    30
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: size of Mainwindow Shrinks when i call it from a Dialog

    the maindialog which i am calling contains a text box and button,and when i call it through a dialog,it gets open but layout changes,if the same thing if i did with dialog the layout wont change..

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: size of Mainwindow Shrinks when i call it from a Dialog

    What do you mean by the layout changes?

  6. #6
    Join Date
    Nov 2010
    Posts
    30
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: size of Mainwindow Shrinks when i call it from a Dialog

    it becomes small,i.e the textbox and pushbutton become small

  7. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: size of Mainwindow Shrinks when i call it from a Dialog

    Post the actual code that constructs your main window. Clearly that is broken badly

  8. #8
    Join Date
    Nov 2010
    Posts
    30
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: size of Mainwindow Shrinks when i call it from a Dialog

    that i have just designed in qt designer,i have not coded for that

Similar Threads

  1. Replies: 1
    Last Post: 12th April 2011, 09:53
  2. How to call a dialog from a mainwindow
    By luiz4um in forum Qt Programming
    Replies: 26
    Last Post: 29th June 2010, 10:41
  3. Open Dialog from MainWindow.
    By halvors in forum Qt Programming
    Replies: 8
    Last Post: 1st April 2010, 01:09
  4. Replies: 4
    Last Post: 20th November 2009, 12:25
  5. Communication between MainWindow and a dialog
    By Backslash in forum Newbie
    Replies: 9
    Last Post: 3rd August 2007, 04:27

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.