Results 1 to 3 of 3

Thread: resize of QMessageBox not working?

  1. #1
    Join Date
    Sep 2008
    Location
    New York
    Posts
    90
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default resize of QMessageBox not working?

    I want to change the size of QMessageBox and use resize(int w, int h) function, but it does not make any difference of appearance, any ideas?
    Thanks,

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: resize of QMessageBox not working?

    QMessageBox has the next flag Qt::MSWindowsFixedSizeDialogHint. so, initially the message box can be resized. but you can try to remove this flag in this case you need to conctruct a dialog by yourself and then call exec() method.
    Last edited by spirit; 12th November 2008 at 16:13.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Sep 2008
    Location
    New York
    Posts
    90
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: resize of QMessageBox not working?

    Quote Originally Posted by spirit View Post
    QMessageBox has the next flag Qt::MSWindowsFixedSizeDialogHint. so, initially the message box can be resized. but you can try to remove this flag in this case you need to conctruct a dialog by yourself and then call exec() method.
    still the same, any more suggestion? I can just go ahead to use a dialog, obviously, but feel better if I know why it does not work, thanks.
    Here is what I have done:

    QMessageBox myMessageBox;
    myMessageBox.setText(versionString);
    myMessageBox.setStandardButtons(QMessageBox::Close );
    myMessageBox.resize(400,200);
    myMessageBox.exec();

Similar Threads

  1. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 00:32

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.