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. Unknow editing main.qml in QtQuick Designer

Unknow editing main.qml in QtQuick Designer

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 766 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.
  • freddy311082F Offline
    freddy311082F Offline
    freddy311082
    wrote on last edited by A Former User
    #1

    Hi guys... I'm trying to do the same that this video does:

    but when I'm trying to edit on the Qt Quick Designer the main.qml file I got the following error:

    Cannot open this QML document because of an error in the QML file:
    Invalid property "visible". (M16) (8:5)
    

    my main.qml file look like this:

    import QtQuick 2.7
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.3
    import QtQuick.Controls.Material 2.0
    
    
    ApplicationWindow {
        visible: true
        width: 1280
        height: 800
        title: qsTr("Smart Home")
    
    
        SwipeView{
            id: swipeView
            anchors.fill: parent
            currentIndex: tabBar.currentIndex
        }
    
        footer: TabBar {
            id: tabBar
            currentIndex: swipeView.currentIndex
    
            TabButton {
                text: qsTr("First")
            }
            TabButton {
                text: qsTr("Second")
            }
        }
    }
    

    the most interesting thing is that this code run perfectly, but I can't edit this file with Qt Quick Designer...

    any idea???

    regards

    1 Reply Last reply
    0
    • jpnurmiJ Offline
      jpnurmiJ Offline
      jpnurmi
      wrote on last edited by
      #2

      This has been fixed in Qt 5.7.1. A temporary workaround is to add

      import QtQuick.Window 2.2
      

      before the controls import. Sorry for the inconvenience.

      1 Reply Last reply
      0
      • freddy311082F Offline
        freddy311082F Offline
        freddy311082
        wrote on last edited by
        #3

        Thanks... it's work for me

        regards

        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