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

Tools > QML/JS > Reformat File is disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • Qt Creator 5.0.0
    • None

    Description

      Tools > QML/JS > Reformat File is disabled for the following code (full project attached):

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Layouts 1.15
      
      ApplicationWindow {
          id: window
          visible: true
          width: 640
          height: 480
      
          ListView {
              id: myListView
              width: 200
              height: 100
              model: 1
              spacing: 5
      
              delegate: Rectangle {
                  width: 200
                  height: 20
                  color: "red"
      
                  Text {
                      anchors.centerIn: parent
                      text: index
                      color: "white"
                  }
              }
      
              ScrollBar.vertical: ScrollBar {
                  id: scrollBar
                  policy: ScrollBar.AsNeeded
      
                  contentItem: Rectangle {
                      implicitWidth: 6
                      implicitHeight: 10
                      radius: width / 2
                      color: scrollBar.pressed ? "#81e889" : "#c2f4c6" }
              }
          }
      }
      

      I tried with Qt 5 and Qt 6 kits.

      Qt Creator 5.0.0
      Based on Qt 5.15.2 (GCC 7.3.1 20180303 (Red Hat 7.3.1-5), 64 bit)
      
      Built on Aug 25 2021 01:16:46
      
      From revision 72536eb155
      

      These are the QML-related plugins I have enabled:

      Attachments

        Issue Links

          Activity

            People

              davschul David Schulz
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: