Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Set QMessageBox icon to application icon
Forum Updated to NodeBB v4.3 + New Features

Set QMessageBox icon to application icon

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kegon
    wrote on last edited by
    #1

    I wish the QMessageBox Icon enum also had ApplicationIcon and then it would use the already set application icon. If the application icon had not been set, no icon would be used.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      I think this is a strange wish; QMessageBox icon is used to show what kind of Message you're showing.

      If you need something like you wish; you can write your custom class inherited from QDialog or QMessageBox.

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kegon
        wrote on last edited by
        #3

        IMHO the warning and critical icons should be used very sparingly in order to avoid overloading the user with messages that might make him/her panic.

        The question and information icons are non-standard (?) and look a bit clunky.

        99 times out of 100 I want to show no icon or the application icon.

        I think the Apple HIG says something similar to what I'm saying.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          QMessageBox icon depends on Style.

          On Windows Xp (Qt5.0.2) all icons look fine.
          If you want customize Icon you could use setIconPixmap()

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved