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

Button texts set with a QStringListModel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.12.0
    • None
    • windows 10 / Qt 5.12.0 / Mingw 64 bits
    • Windows

    Description

      Hi,

      I tried to display a GridLayout of Buttons for whom Button texts are given by a QStringListModel. I use the "display" role to set the text attribute of the Button element.. it seems that it doesn't work (it displays a number in the Button text). 

      A Solution : Add a Text element in the Button.

      Please find in attachment a snippet which reproduce the issue. To solve the issue, uncomment the Text element.

      Regards.

      David.

      Attachments

        1. main.cpp
          0.8 kB
        2. main.qml
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            draimond David RAIMOND
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes