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

Item in invalid location still is gets rendered in preview

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • Qt Creator 4.1.0-beta1
    • Qt Creator 3.1.1
    • Quick Designer
    • None
    • Ubuntu/Debian with ubuntu-sdk

      Qt Creator 3.1.1
      Based on Qt 5.2.1 (GCC 4.8.2, 64 bit)

      Built on Aug 1 2014 at 17:31:01

      I have a Rectangle inside a State.
      I now know this is not possible and you must use PropertyChanges. However, this invalid code still caused the preview renders at the top of the Design view to display the Rectangle. I think it should not be displayed in the preview.

      The Rectangle is not visible/clickable in the designer itself, and also isn't listed in the navigator.

      On a side-note: maybe the Rectangle should be highlighted in the editor as invalid code? Or are there cases where this syntax IS valid?

      import QtQuick 2.2
      
      Rectangle {
      	id: root
      	width: 360
      	height: 360
      
      	states: [
      		State {
      			name: "someState"
      			
      			Rectangle {
      				id: someRectangle
      				x: 200
      				y: 200
      				width: 100
      				height: 100
      				color: "#ff0000"
      				opacity: 1
      			}
      		}
      	]
      }
      

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

            thohartm Thomas Hartmann
            geertjohan Geert-Johan Riemer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes