Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Extra characters after test expression
Forum Updated to NodeBB v4.3 + New Features

Extra characters after test expression

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 648 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • sonichyS Offline
    sonichyS Offline
    sonichy
    wrote on last edited by
    #1

    qmlscene a.qml
    a.qml:1: Extra characters after test expression.
    Error processing project file: a.qml

    import QtQuick 2.3
    
    Rectangle {
        width: 300
        height: 300
        color: "lightgray"
    
        Text {
            anchors.centerIn: parent
            text: "Hello, QML!"
        }
    }
    

    https://github.com/sonichy

    J.HilkJ 1 Reply Last reply
    -1
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I've tried the code you pasted with qmlscene from Qt 5.15 and it worked without any errors or warnings.

      Make sure your file is encoded with UTF-8. Try changing line ending style to Unix if that does not help.

      (Z(:^

      1 Reply Last reply
      0
      • sonichyS sonichy

        qmlscene a.qml
        a.qml:1: Extra characters after test expression.
        Error processing project file: a.qml

        import QtQuick 2.3
        
        Rectangle {
            width: 300
            height: 300
            color: "lightgray"
        
            Text {
                anchors.centerIn: parent
                text: "Hello, QML!"
            }
        }
        
        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        @sonichy said in Extra characters after test expression:

        Error processing project file: a.qml

        is that copied and pasted? because qml file that instantiate items have to start with a capital letter!


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        sierdzioS 1 Reply Last reply
        0
        • J.HilkJ J.Hilk

          @sonichy said in Extra characters after test expression:

          Error processing project file: a.qml

          is that copied and pasted? because qml file that instantiate items have to start with a capital letter!

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @J-Hilk said in Extra characters after test expression:

          @sonichy said in Extra characters after test expression:

          Error processing project file: a.qml

          is that copied and pasted? because qml file that instantiate items have to start with a capital letter!

          Not if it's the only file opened by qmlscene (same as main.qml does not need to be Main.qml in regular apps).

          (Z(:^

          J.HilkJ 1 Reply Last reply
          0
          • sierdzioS sierdzio

            @J-Hilk said in Extra characters after test expression:

            @sonichy said in Extra characters after test expression:

            Error processing project file: a.qml

            is that copied and pasted? because qml file that instantiate items have to start with a capital letter!

            Not if it's the only file opened by qmlscene (same as main.qml does not need to be Main.qml in regular apps).

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            @sierdzio thats why I wrote instantiate items, may be the wrong wording 🤷‍♂️

            if you have somewhere ein your code

            MyQmlObject {
            
            }
            

            the class has to have a capital starting letter, If you load stuff directly to the qml engine, than yes, no capital letter needed


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved