Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved Unknow editing main.qml in QtQuick Designer

    QML and Qt Quick
    2
    3
    620
    Loading More Posts
    • 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.
    • freddy311082
      freddy311082 last edited by A Former User

      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 Reply Quote 0
      • jpnurmi
        jpnurmi last edited by

        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 Reply Quote 0
        • freddy311082
          freddy311082 last edited by

          Thanks... it's work for me

          regards

          1 Reply Last reply Reply Quote 0
          • First post
            Last post