QT 5.10 Expected token `numeric literal' bug



  • 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?



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



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.