Results 1 to 4 of 4

Thread: ReferenceError when moving from QtQuick 1 to QtQuick 2 in example code

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default ReferenceError when moving from QtQuick 1 to QtQuick 2 in example code

    I am looking at the CollapsiblePanel example found here:

    http://developer.nokia.com/community...Panel_with_QML

    It was done with QtQuick 1.0

    With Qt 5.2.1 I created a QtQuick 2.0 project and copied in the main.qml, CollapsiblePanel.qml, and icons. I changed the imports from QtQuick 1.0 to QtQuick 2.0. When clicking on an item in the panel, the Application Output window displays

    file:///Projects/buildCollapsiblePanel/qml/CollapsiblePanel/main.qml:98: ReferenceError: myRect is not defined

    For some reason it is unable to access the CollapsiblePanel ID from the ListView delegate.

    Why is this broken? Is there a new and better way to do this?

    Thanks ......
    Last edited by gmat4321; 5th March 2014 at 17:25.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: ReferenceError when moving from QtQuick 1 to QtQuick 2 in example code

    There is no element in main.qml with id "myRect"

    There is also no context property with that name.

    Which element is this supposed to refer to?

    Cheers,
    _

Similar Threads

  1. Import QtQuick 2.0 or 2.1 or 2.2?
    By pherthyl in forum Qt Quick
    Replies: 2
    Last Post: 9th January 2014, 20:13
  2. QtQuick structure
    By codeman in forum Qt Quick
    Replies: 4
    Last Post: 21st May 2013, 10:35
  3. QtQuick 2.1
    By shadowroot in forum Qt Quick
    Replies: 1
    Last Post: 6th April 2013, 08:44
  4. What is QtQuick/QML really for?
    By Huk in forum Qt Quick
    Replies: 7
    Last Post: 21st June 2012, 20:33
  5. Designer or QtQuick?
    By Jeffb in forum Qt Quick
    Replies: 5
    Last Post: 9th August 2011, 06:38

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.