ApplicationWindow "opacity" is error?
Solved
QML and Qt Quick
-
Hi,
My attention was needed in the real world. Now I'm back, but unfortunately I cannot reproduce the use case where I didn't have any problems.
I found some similar bugs reports with the same error message but yours looks differently.
You could file a bug report for your case, unless somebody else knows a solution here.
-
Hi.
It's not a bug.
It's releated to meta object revison.
Property oapacity of ApplicationWindow is defined as revison 1.
But, QtQuick.Controls 2 can only use revision 0.
Take a look at the defined type information for that plugin(aka. plugins.qmltypes) and following doc: http://doc.qt.io/qt-5/qtqml-cppintegration-definetypes.html#type-revisions-and-versions -
@jpnurmi
Thanks for the feedback.@Alex_wang : you can use it like this:
import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 ApplicationWindow { id: app visible: true width: 640 height: 480 title: qsTr("Hello World") color: "yellow" Binding { target: app; property: "opacity"; value: 0.5}