I am using QT6 (6.5.2)
Moved
Unsolved
QML and Qt Quick
-
I am using QT 6
import QtQuick 6.4 import 'popup' as Popup Component { id: screenConnection Item { anchors.fill : screenConnection Component.onCompleted: screens.openProgress() } }
ERROR AS WARING:
Using a Component as the root of a QML document is deprecated: types defined in qml documents are automatically wrapped into Components when needed. -
@srinath_ramamoorthy Do you have a question?
-
@srinath_ramamoorthy Don't use Component as root element
-
@ChrisW67 can you provide an example for above mentioned code
I have tried it It is not working for me
import QtQuick 6.4 import 'popup' as Popup /******************************************************************************* * Implementation. ******************************************************************************/ Item { Component { id: screenConnection anchors.fill : screenConnection Component.onCompleted: screens.openProgress() } }
or
Item { Component { id: screenConnection { anchors.fill : screenConnection Component.onCompleted: screens.openProgress() } } }
-
@srinath_ramamoorthy said in I am using QT6 (6.5.2):
is not working for me
How about telling us what exactly does not work?
-
@srinath_ramamoorthy I believe that you do not need
Component
here. Just remove it and see if that resolves your issue. -
C Christian Ehrlicher moved this topic from General and Desktop on