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

QFontComboBox doesn't support proxy models

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.13.0
    • None
    • All

    Description

      At the moment applying a proxy model to the model of QFontComboBox breaks the class.
      This is only due to a questionable design choice that is easily resolved.

      Instead of creating the model in QFontComboBox::QFontComboBox and then relying on qobject_cast<QStringListModel *>(q->model()) to retrieve it, store the model pointer inside QFontComboBoxPrivate.

      This allows the final user to use QFontComboBox::model to retrieve the original model, set it as the source for a proxy and setting this proxy back as the model for the combo.

      This also fixes QTBUG-34730 as at that point the user is free to subclass QSortFilterProxyModel to filter out the fonts (s)he doesn't want.

      Attachments

        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
            VRonin Luca
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes