Results 1 to 3 of 3

Thread: QMessageBox size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Location
    Italy
    Posts
    172
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    39

    Default QMessageBox size

    Hello, i created a QMessageBox in this way:
    Qt Code:
    1. QMessageBox::about(this, "title" , "message");
    To copy to clipboard, switch view to plain text mode 
    can't i set a default size for height and weidth?
    thx

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: QMessageBox size

    I don't think you can, when using the convenience static methods.
    You can create a QMessageBox on the stack for example, and resize it before you you call exec().
    But it is just as much (or little) work to subclass and add that functionality too...
    Your choice.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

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

    Default Re: QMessageBox size

    The question is, what do you need it for?

Similar Threads

  1. QMessageBox Size
    By locus in forum Qt Programming
    Replies: 2
    Last Post: 20th July 2011, 13:35
  2. QLabel size policy
    By Caius Aérobus in forum Qt Programming
    Replies: 3
    Last Post: 7th December 2007, 17:57
  3. Replies: 1
    Last Post: 24th October 2006, 16:40
  4. change font size and button size of QMessageBox
    By nass in forum Qt Programming
    Replies: 6
    Last Post: 13th September 2006, 19:16
  5. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14

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.