ubuntu-ui-toolkit-launcher doesn't support Window as root item

Bug #1597672 reported by Cris Dywan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Fix Committed
High
Cris Dywan

Bug Description

Using a QtQuick.Window as a root item with ubuntu-ui-toolkit-launcher results in an error loading the QML:

import QtQuick 2.4
import QtQuick.Window 2.2
import Ubuntu.Components 1.3
Window {
    title: "Hello World"
    minimumWidth: units.gu(30)
    minimumHeight: units.gu(50)
    maximumWidth: units.gu(90)
    maximumHeight: units.gu(120)
    MainView {
        applicationName: "Hello World"
    }
}

QQuickView only supports loading of root objects that derive from QQuickItem.
If your example is using QML 2, (such as qmlscene) and the .qml file you
loaded has 'import QtQuick 1.0' or Qt 4.7', this error will occur.
To load files with 'import QtQuick 1.0' or Qt 4.7', use the
QDeclarativeView class in the Qt Quick 1 module.

That same piece of code works with qmlscene.

See also bug 1587431.

Related branches

Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.