Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-11186

Setting TextFieldStyle font.pointSize doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • Qt Creator 3.0.0, Qt Creator 3.5.0
    • Quick / QML Support
    • Qt 5.2, Qt 5.5

    Description

      The attached example will complain about the line font.pointSize: 50
      It will show error: 'font' does not have members. (M17)
      The issue will also prevent QML designer from opening.

      When launching the application the code works fine. Also if the line is written as "font

      {pointSize: 50}

      " Qt Creator doesn't complain about it and designer works as well.

      main.qml
      import QtQuick 2.1
      import QtQuick.Controls 1.1
      import QtQuick.Controls.Styles 1.1
      
      Rectangle {
          width: 360
          height: 360
      
          TextField {
              anchors.centerIn: parent
              width: 300
              height: 200
      
              style: TextFieldStyle {
                  font.pointSize: 50
              }
          }
      }
      

      Attachments

        Activity

          People

            mabenell Marco Benelli
            kileppal Kimmo Leppälä
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: