Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-58674

Setting icon for Discard buton in QDialogButtonBox is not working

    XMLWordPrintable

Details

    • 5adf18909d2de38eb04d5305bf87c0ce601af502

    Description

      Setting stylesheet for QDialogButtonBox such as:

      QDialogButtonBox
      {
        dialogbuttonbox-buttons-have-icons: 1;
        dialog-save-icon: url(:/icons/save.png);
        dialog-discard-icon: url(:/icons/discard.png);
      }
      

      leads to changing icon for Save button but not for Discard button. Maybe it because of some inconsistency in qstylesheetstyle.cpp. There are "dialog-save-icon" and "dialog-discard-icon" items in knownStyleHints[] array but in propertyNameForStandardPixmap() function for Discard button "dialog-" part of string is missing:

      case QStyle::SP_DialogSaveButton: return QLatin1String("dialog-save-icon");
      ...
      case QStyle::SP_DialogDiscardButton: return QLatin1String("discard-icon");
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            perchits Andrey Perchits
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes