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. QtQuick 2.0 doesn't supported by Qt Designer in 5.2.1
Qt 6.11 is out! See what's new in the release blog

QtQuick 2.0 doesn't supported by Qt Designer in 5.2.1

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.2k 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.
  • M Offline
    M Offline
    mysite1920
    wrote on last edited by
    #1

    Hello,
    I just installed Qt 5.2.1 on Windows 7 and start creating a single QML File (Qt Quick 2) with some code. When I edit this QML file in Qt Designer, it says "Use Qt Quick 1 code model instead of Qt Quick 2". Now when I start a new Qt Quick UI project instead of a single QML file (from Files and Classes), it doesn't show any error in Qt Designer. Also, it show red and yellow line in Qml file when used as a single file. Here's the code:
    // Note: The below code works fine when I run using qmlscene, but show red and yellow line.
    @import QtQuick 2.2

    Item {
    id: topItem
    width: 500
    height: 500
    Rectangle {
    width: 150
    height: 40
    border.width: 1
    border.color: Qt.hsla(.2, .4, .2, .2)
    radius: 3
    // Or use anchors.verticalCenter and anchors.horizontalCenter
    anchors.centerIn: parent
    color: Qt.rgba(.9, .2, .1, .9)

        MouseArea {
            anchors.fill: parent
            // here shows the error in cursorShape in codeEditor, but works fine when I run this code
            cursorShape: Qt.PointingHandCursor
            
        }
        Text {
            id: myBtn
            text: "<a href='http://google.com'>Click me</a>"
            textFormat: Text.RichText
            anchors.centerIn: parent
            font {
                family: "Source Sans Pro Black"
                pixelSize: 14
            }
            onLinkActivated: Qt.openUrlExternally(link);
    
        }
       
    
    }
    

    }
    @

    1 Reply Last reply
    0
    • O Offline
      O Offline
      onek24
      wrote on last edited by
      #2
      • Could you provide us your Cpp code(Especially where the View is)?
      • Could you try it with QtQuick 2.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