Results 1 to 5 of 5

Thread: QMessageBox - Text in the buttons

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Aug 2013
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMessageBox - Text in the buttons

    There's also one good way:
    Qt Code:
    1. QMessageBox msgBox(
    2. QMessageBox::Question,
    3. trUtf8("Eliminar CD"),
    4. record.value(cd_titulo).toString(),
    5. QMessageBox::Yes | QMessageBox::No);
    6.  
    7. msgBox.setButtonText(QMessageBox::Yes, trUtf8("Sim"));
    8. msgBox.setButtonText(QMessageBox::No, trUtf8("Não"));
    9.  
    10. if (msgBox.exec() == QMessageBox::No) {
    11. db.rollback();
    12. return;
    13. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by kefir500; 20th August 2013 at 11:27.

Similar Threads

  1. SETTING THE TEXT COLOR FOR QMessageBox
    By vinkakarun in forum Newbie
    Replies: 2
    Last Post: 5th November 2009, 16:32
  2. QMessageBox ignores nobr with rich text format
    By daggilli in forum Qt Programming
    Replies: 0
    Last Post: 14th October 2008, 03:54
  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. widget for text AND buttons
    By nongentesimus in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 13:43

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.