forked from qt-creator/qt-creator
Adds classes to merge a template qml file and a qml stylesheet that have been exported from other design tools into a resulting qml file that can be used for further processing in Qt Design Studio. Current issues: * Sometimes it makes sense to define width and height if an anchor is present, but most of the time not. * Actually if the hierachy was defined (e.g. Text item not child of background) most likely the anchors should be ignored. But this would be just a "dirty" heuristic. I suggest to let the template decide. If the template has anchors those have "precedence". It is always possible to define templates without anchors. Task-number: QDS-2071 Change-Id: I9159514a8e884b7ffc31897aef4551b5efbbcb87 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
44 lines
820 B
QML
44 lines
820 B
QML
// Test that an empty style sheet will leave the original template untouched.
|
|
import QtQuick 2.1
|
|
|
|
Rectangle {
|
|
id: root
|
|
x: 10;
|
|
y: 10;
|
|
Rectangle {
|
|
id: rectangle0
|
|
x: 10;
|
|
y: 10;
|
|
height: 150
|
|
width: 200
|
|
}
|
|
Rectangle {
|
|
id: rectangle2
|
|
x: 100;
|
|
y: 100;
|
|
anchors.fill: root
|
|
}
|
|
Rectangle {
|
|
id: rectangle3
|
|
x: 140;
|
|
y: 180;
|
|
gradient: Gradient {
|
|
GradientStop {
|
|
position: 0
|
|
color: "white"
|
|
}
|
|
GradientStop {
|
|
position: 1
|
|
color: "black"
|
|
}
|
|
}
|
|
Rectangle {
|
|
id: rectangle4
|
|
x: 10
|
|
y: 20
|
|
width: 200
|
|
height: 50
|
|
}
|
|
}
|
|
}
|