Results 1 to 2 of 2

Thread: code correctness

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default code correctness

    Hello forum,

    I have started QML with Qt 5.2.1 and stumbled upon the following code snippet found in the documentation:

    Qt Code:
    1. import QtQuick 2.0
    2.  
    3. Rectangle {
    4. color: "#00B000"
    5. width: 80; height: 80
    6. }
    7.  
    8. Rectangle {
    9. color: "steelblue"
    10. y: 100; width: 80; height: 80
    11. }
    To copy to clipboard, switch view to plain text mode 

    I am getting error with second rectangle as syntax error.

    Is there anything wrong in the hierarchy ? I did not make any changes.

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: code correctness

    A document can have just one root element. Yours has two.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. code
    By alexrat1996 in forum Newbie
    Replies: 3
    Last Post: 15th February 2013, 16:18
  2. Replies: 7
    Last Post: 6th September 2012, 07:07
  3. Const-Correctness With Q_PROPERTY
    By Sanuden in forum Qt Programming
    Replies: 11
    Last Post: 15th November 2010, 19:06
  4. Pasting code from code tag in emacs
    By Gopala Krishna in forum General Discussion
    Replies: 0
    Last Post: 16th February 2007, 05:47
  5. use of VC++ code in Qt
    By shailesh in forum Qt Programming
    Replies: 4
    Last Post: 28th April 2006, 11:11

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.