Update SDK Templates to wrap MainView in a Window item
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Client Developer Experience |
New
|
Undecided
|
Zoltan Balogh | ||
qtcreator-plugin-ubuntu (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Currently, like 99% of the apps don't work well on windowed environments in a sense that they neither set preferred/
The new templates should be something like
import QtQuick 2.4
import QtQuick.Window 2.2
import Ubuntu.Components 1.3
Window {
width: units.gu(70)
height: units.gu(70)
visible: true
title: i18n.tr("My cool app's name")
minimumWidth: units.gu(40)
minimumHeight: units.gu(40)
MainView {
...
}
}
}
This should "just work" in qmlscene based templates. In templates that are based on a main.cpp, the cpp code needs to be changed into something like:
int main(int argc, char* argv[]) {
QGuiApplication app(argc, argv);
QQmlApplica
engine.
}
description: | updated |
Changed in canonical-developer-experience: | |
assignee: | nobody → Zoltan Balogh (bzoltan) |