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

MacOS: Changing the font of QComboBox applies the set font to popup items, ignoring the item model

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      5cff7d2b679d48a247b4630cb9e3d5b04fab0b55

      Description

      When populating QComboBox with several items that use different fonts / font properties (i.e. italics), and then setting the QComboBox to use the chosen item's font, the behaviour differs between MacOS and Windows.

      On Windows the behaviour is such that the QComboBox label shows the font that the chosen item has, and the popup still keeps showing the font / font properties that the model provides.

      On MacOS when you set the font to QComboBox, it applies the same font to each popup item, effectively overriding the item model's provided properties.

      Steps to reproduce:

      • Run attached sample
      • Select item 0, and then item 5
      • Observe the font italic property in the QComboBox label and popup items
      • EXPECTED: The popup items keep the model's provided properties while QComboBox shows the selected item's font / properties
      • ACTUAL: The model's properties are ignored and overridden by the SetFont call

        Attachments

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

          Activity

            People

            Assignee:
            dedietri Gabriel de Dietrich (drgvond)
            Reporter:
            jussi_witick Jussi Witick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes