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

Change transparency of tree item view should not affect the transparency checkmark inside buddy checkbox

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.5
    • 5.9.1
    • Widgets: Styles
    • None
    • 631f68c97280436b4d241865d9a1d33fc9444691

    Description

      If you force transparency of label by overwriting delegate of item view as follow :

      bool item::customData(
          const QString& fieldName,
          int role,
          QVariant& data
      ) {
          if (fieldName == NAME_COLUMN) {
              if( role == Qt::ForegroundRole) {
                  QColor c = qApp->palette().brush(QPalette::Text).color() ;
                  c.setAlpha(0) ;
                  data = QBrush(c);
                  return true;
              } else if( role == Qt::BackgroundRole) {
                  QColor c = qApp->palette().brush(QPalette::Background).color() ;
                  c.setAlpha(0) ;
                  data = QBrush(c);
                  return true;
      ...

      this change affect the transparency of checkmark.

      Attachments

        For Gerrit Dashboard: QTBUG-65737
        # Subject Branch Project Status CR V

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            jonathan.ponroy jonathan.ponroy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes