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

ItemDelegate different font with inherited components

    XMLWordPrintable

Details

    • Linux/X11

    Description

      ItemDelegate has default font option different from RadioDelegate, SwitchDelegate and SwipeDelegate. This does not have much sense, since the visual result is like in attachment.

      Code is the following, with Material style enabled with qtcontrols2.conf

       

          Drawer {
              id: drawer
              width: root.width * 0.5
              height: root.height        
              
              Column {
                  anchors.fill: parent            
                      ItemDelegate {
                      text: qsTr("Item Delegate")
                      width: parent.width
                      Component.onCompleted: console.log(font)
                  }            
                  RadioDelegate {
                      text: "Radio"
                      width: parent.width
                      Component.onCompleted: console.log(font)
                  }            
                  SwitchDelegate {
                      width: parent.width
                      text: "Check"
                      checked: false
                  }
              }
          }
      

      Output:

      qml: QFont(Sans,-1,16,5,50,0,0,0,0,0)
      qml: QFont(Sans,-1,14,5,57,0,0,0,0,0)

       

      Attachments

        1. bugdelegate.png
          14 kB
          Maurizio Ingrassia

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            moia Maurizio Ingrassia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: