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

QML Preview: Keep showing the last good state if intermediate typing results in a broken QML document

    XMLWordPrintable

Details

    Description

      Code

      import QtQuick
      
      Window {
          width: 400
          height: 300
          visible: true
      }
      

       

      Steps to test

      1. Put the code above in a QML project and start the QML Preview
      2. Add a new import, like import QtQuick.Controls
      3. Add a new property, like color: 'green'

       

      Current outcomes

      • (Step #2): Typing "import " is fine. But as soon as we add another character ("import Q"), the window disappears and the General Mesages pane shows an error ("module "Q" is not installed")
      • (Step #3): Typing "color: " is fine. But as soon as we hit the quotation-mark key ("color: ''"), the window disappears and the General Mesages pane shows an error ("Invalid property assignment: color expected")

       

      Suggestion
      If an attempt to load an updated QML document fails, then the previous good preview should be retained

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes