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

QComboBox's QLineEdit does not Inherit Font

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.4.0
    • None
    • macOS, Windows

      SETUP:

      • QComboBox child object is initialized from a .ui file.
      • QComboBox inherits a preset font from the object's parent.

      EXPECTED BEHAVIOR:

      • QComboBox shall permeate the font to it's child objects

      ACTUAL BEHAVIOR:

      • When QComboBox editable is true in the .ui file, the font does not permeate to the QLineEdit child object and the QLineEdit font settings remain the default font. However, when editable is false, the font permeates through QComboBox and it functions as it should.
      • Example:

      WORKAROUND:

      • QComboBox's derived class can override setEditable and set the font for QLineEdit when it is enabled.
      void DerivedComboBox::setEditable(bool editable)
      {
          QComboBox::setEditable(editable);
          this->lineEdit()->setFont(this->font());
      } 

       

       

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mattykakes Matthew Miller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes