Results 1 to 2 of 2

Thread: Message box comes up with wrong icon and no default button

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2017
    Posts
    37
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Message box comes up with wrong icon and no default button

    Qt Code:
    1. bool TinCanvas::mouseCheckImported()
    2. {
    3. bool ret;
    4. if (doc.pl[plnum].whichBreak0Valid==1)
    5. {
    6. QMessageBox msgBox(this);
    7. msgBox.setText(tr("You have imported breaklines."));
    8. msgBox.setInformativeText(tr("Do you want to edit?"));
    9. msgBox.setStandardButtons(QMessageBox::Yes|QMessageBox::No);
    10. msgBox.setIcon(QMessageBox::Question);
    11. msgBox.setDefaultButton(QMessageBox::No);
    12. ret=msgBox.exec()==QMessageBox::Yes;
    13. }
    14. else
    15. ret=true;
    16. return ret;
    17. }
    To copy to clipboard, switch view to plain text mode 
    When I run the program and click on an edge after importing breaklines, this message box pops up, but its icon is (i), not (?), and neither button looks like the default. I've tested it and found that the default button is, in fact, "No".

    I'm running Kubuntu Xenial; "ldd `which kate`" shows that it is using Qt5, as is my program.
    Attached Images Attached Images

Similar Threads

  1. QTreeWidgetItem one icon + one icon button
    By Alundra in forum Qt Programming
    Replies: 1
    Last Post: 21st November 2014, 10:29
  2. Qt 4.8.6 windows 7 default wrong style
    By mero in forum Qt Programming
    Replies: 0
    Last Post: 1st May 2014, 13:54
  3. Replies: 2
    Last Post: 26th April 2011, 11:44
  4. system tray message is not displaying near tary icon
    By sudhansu in forum Qt Programming
    Replies: 0
    Last Post: 29th March 2010, 17:31
  5. Icon and another picture looks wrong
    By John-P in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 22nd February 2010, 12:14

Tags for this Thread

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.