Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.13.0
-
None
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.