Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QT 5.10 Expected token `numeric literal' bug

QT 5.10 Expected token `numeric literal' bug

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 5.7k Views
  • 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.
  • MikhailGM Offline
    MikhailGM Offline
    MikhailG
    wrote on last edited by MikhailG
    #1

    Hello I`m expierencing this strange bug in qt 5.10 but if I change the qt version to 5.8.0 everything works just fine. The error appears in this line if (lastKeyBoard !== let)

    import QtQuick 2.9
    import QtQuick.Window 2.2
    
    Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
        property var lastKeyBoard: letRu
        function setKeyBoard(txt) {
    
            if(txt === "text")
            {
                if (lastKeyBoard !== let) // ERROR Expected token `numeric literal'
                    lastKeyBoard = letRu
                lastKeyBoard.visible = true
            }
        }
    }
    

    What could it be?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! What's letRu? let is a reserved keyword in Javascript.

      A 1 Reply Last reply
      2
      • MikhailGM Offline
        MikhailGM Offline
        MikhailG
        wrote on last edited by
        #3

        Yes it was the problem. Thank you. So the bug was in QT 5.8.0 apparently.

        1 Reply Last reply
        0
        • ? A Former User

          Hi! What's letRu? let is a reserved keyword in Javascript.

          A Offline
          A Offline
          aurora_ns
          wrote on last edited by
          #4

          Sir, I am a newbie. Can you please help me to? I haven't even started and got that error.
          https://forum.qt.io/topic/151582/qt-qml-execution-problem-after-installation?_=1698365642694

          1 Reply Last reply
          0

          • Login

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