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. TapHandler isn't working for me :'(

TapHandler isn't working for me :'(

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 588 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.
  • J Offline
    J Offline
    JoeJoe_000
    wrote on last edited by aha_1980
    #1

    Hello Qt Freinds,

    I'm trying QtQuick for the first time I'm following the tutorial located @ here

    I'm running into the following error in Qt Creator:
    qrc:/main.qml:13 TapHandler is not a type

    Here is the code

    import QtQuick 2.12
    
    Rectangle {
        width: 200
        height: 100
        color: "red"
    
        Text {
            anchors.centerIn: parent
            text: "Hello, World!"
        }
    
        TapHandler {
            onTapped: parent.color = "blue"
        }
    }
    

    If I use the import statement as is, I get the following error:

    QQmlApplicationEngine failed to load component
    qrc:/main.qml:1 module "QtQuick" version 2.12 is not installed

    I can use version 2.9 or 2.10 and all is good other that the TapHandler related error.

    I'm using QtCreator 4.9.0.

    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