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

Add Icon component to Controls

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • Quick: Controls 2
    • None

      Qt Quick Controls has some components (e.g. AbstractButton and all derived components) that show icons. These icons are set using properties such as icon.source. When displayed, they will change color depending on the current color scheme (e.g. Material.Dark will display all icons as white). Sometimes, such icons would be useful to use without being attached to an AbstractButton, MenuItem, or other such component; instead, they could be shown as context for a Label. I propose that the existing icon code be reused to create an Icon component that has approximately the following API:

      // Icon.qml
      Control {
          property string source // path to icon file
          property string name // used to choose a system icon on Linux
          property color color // used to override the icon's color
          property bool cache: true // caches the icon
      }
      

      This API is largely copied from existing icon interfaces.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            lorendb Loren Burkholder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes