Results 1 to 3 of 3

Thread: QMessageBox custom buttons icons

  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QMessageBox custom buttons icons

    Hello,
    I want to make Qmessage box using my strings instead of english ones eg
    msgBox.addButton("Zapisz", QMessageBox.AcceptRole)
    However when i do so the icon present in standard button QMessageBox.Save is not present in my button.
    How can I force the standard button icons to be present in my custom buttons but doing the same role as QMessageBox.Save?

    Thank You for Your ansewers

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMessageBox custom buttons icons

    How about using the internationalization features provided by Qt? Your message box should then automagically get a correctly translated button text.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMessageBox custom buttons icons

    Does it give the chance to put any text I like becouse internationalization is not excactly what i mean i just want to change the text not only to my language but also the word sometimes ie If I would like to replace the
    'cancel' with 'cancel operation' ?
    What internationalization features do you have in mind can I ask for the link?
    Last edited by asik; 2nd December 2010 at 17:02.

Similar Threads

  1. QMessageBox - Text in the buttons
    By graciano in forum Qt Programming
    Replies: 4
    Last Post: 20th June 2015, 23:51
  2. Button icons in QMessageBox?
    By holst in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2010, 16:27
  3. QMessageBox buttons appearance
    By yartov in forum Qt Programming
    Replies: 6
    Last Post: 26th June 2008, 01:36
  4. Replies: 3
    Last Post: 25th April 2007, 12:43
  5. Change icons on static QMessageBox
    By manucorrales in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2006, 19:00

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.