Qml component not displaying in designer
-
Hello,
I didn't find anything on Google so deciding to open this thread.Installed Qt Creator on mac os BigSur 11.6, M1
via qt-unified-macOs-x64-4.3..0-1-online
Doing New project > Application (Qt for Python) > Qt Quick Application - Empty > Qt 5.15
Activated plugin QmlDesigner 6.0.2
Trying to display main.qml in QmlDesigner but the display area (where you drag'n'drop the components) is empty. If I select all, I can see the frames of the components.
Runing the application works as expected (components are displayed as they are defined)
Things i've tried :
Tried with default main.qml, tried with custom one (The one from the screenshot)
Tried changing the version of QtQuick imports in the main.qml
Tried changing the version of Qt to 6.0 instead of 5.15
Uninstalled / Reinstalled
Tried the Qt Creator 7.0.0-rc1The custom qml from the screenshots :
/**************************************************************************** ** ** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Quick Studio Components. ** ** $QT_BEGIN_LICENSE:GPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 or (at your option) any later version ** approved by the KDE Free Qt Foundation. The licenses are as published by ** the Free Software Foundation and appearing in the file LICENSE.GPL3 ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ import QtQuick 2.15 import QtQuick.Window 2.15 Window { width: 1000 height: 580 visible: true title: "QtUi" Rectangle { id: bg color: "#2c313c" border.color: "#353b48" anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom anchors.rightMargin: 10 anchors.leftMargin: 10 anchors.bottomMargin: 10 anchors.topMargin: 10 Rectangle { id: appContainer color: "#00ffffff" anchors.fill: parent anchors.rightMargin: 1 anchors.leftMargin: 1 anchors.bottomMargin: 1 anchors.topMargin: 1 Rectangle { id: topBar height: 60 color: "#1c1d20" anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.rightMargin: 0 anchors.leftMargin: 0 anchors.topMargin: 0 } Rectangle { id: content color: "#00ffffff" anchors.left: parent.left anchors.right: parent.right anchors.top: topBar.bottom anchors.bottom: parent.bottom anchors.rightMargin: 0 anchors.bottomMargin: 0 anchors.leftMargin: 0 anchors.topMargin: 0 Rectangle { id: leftMenu width: 70 color: "#1c1d20" anchors.left: parent.left anchors.top: parent.top anchors.bottom: parent.bottom } } } } }
Hoping someone can enlighten me ! (fairly new to Qt)
-
@SethMacMaroon said in Qml component not displaying in designer:
BigSur 11.6, M1
Hi,
I created a bugreport:
https://bugreports.qt.io/browse/QDS-6487
Can you try if the file works in Qt Design Studio which also can be installed using the online installer?
The issue might be related to the Qt Kit in Qt Creator, and Qt Design Studio always comes with a working/tested Qt kit.As far as I can tell it does work:
-
Hello,
I installed Qt Design Studio and I confirm that I can see the elements if I copy/paste the content of the qml inside the base rectangle, so I cannot reproduce the issue I have with QmlDesigner. Also the default qml when doing 'new project' displays everything as expected.Side note : the side bar (id: leftMenu) is displayed with a width of 0 in Qt Design Studio (but that doesn't seems related, probably just a bad copy/paste between studio and Qmldesigner ?)
-
@SethMacMaroon hello, i also ave problem with Mac OS and qt, the qtdesigner always asking to access my documents, and qtdesign Studio have an error with kit and I can’t solve it.
Are you following a tuto of Wanderson on YouTube ? 😂