mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 12:14:00 +02:00
Tweaking test dialog and adding browser test
This commit is contained in:
parent
fd0c130dc2
commit
781abdd047
2 changed files with 59 additions and 26 deletions
45
interface/resources/qml/Browser.qml
Normal file
45
interface/resources/qml/Browser.qml
Normal file
|
@ -0,0 +1,45 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Window 2.2
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Controls.Styles 1.3
|
||||
import QtWebKit 3.0
|
||||
|
||||
CustomDialog {
|
||||
title: "Test Dlg"
|
||||
id: testDialog
|
||||
objectName: "Browser"
|
||||
width: 1280
|
||||
height: 720
|
||||
|
||||
Item {
|
||||
id: clientArea
|
||||
// The client area
|
||||
anchors.fill: parent
|
||||
anchors.margins: parent.margins
|
||||
anchors.topMargin: parent.topMargin
|
||||
|
||||
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
WebView {
|
||||
id: webview
|
||||
url: "http://slashdot.org"
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// This is the behavior, and it applies a NumberAnimation to any attempt to set the x property
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
}
|
||||
*/
|
|
@ -4,34 +4,20 @@ import QtQuick.Window 2.2
|
|||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Controls.Styles 1.3
|
||||
|
||||
Item {
|
||||
objectName: "TestDialog"
|
||||
CustomDialog {
|
||||
title: "Test Dlg"
|
||||
id: testDialog
|
||||
width: 384
|
||||
height: 384
|
||||
objectName: "TestDialog"
|
||||
width: 512
|
||||
height: 512
|
||||
scale: 0.0
|
||||
|
||||
onEnabledChanged: {
|
||||
scale = enabled ? 1.0 : 0.0
|
||||
}
|
||||
onScaleChanged: {
|
||||
visible = (scale != 0.0);
|
||||
}
|
||||
Component.onCompleted: {
|
||||
scale = 1.0
|
||||
}
|
||||
Behavior on scale {
|
||||
NumberAnimation {
|
||||
//This specifies how long the animation takes
|
||||
duration: 400
|
||||
//This selects an easing curve to interpolate with, the default is Easing.Linear
|
||||
easing.type: Easing.InOutBounce
|
||||
}
|
||||
}
|
||||
|
||||
CustomDialog {
|
||||
title: "Test Dlg"
|
||||
Item {
|
||||
id: clientArea
|
||||
// The client area
|
||||
anchors.fill: parent
|
||||
anchors.margins: parent.margins
|
||||
anchors.topMargin: parent.topMargin
|
||||
|
||||
Rectangle {
|
||||
property int d: 100
|
||||
|
@ -55,16 +41,18 @@ Item {
|
|||
anchors.top: parent.top
|
||||
anchors.topMargin: parent.titleSize + 12
|
||||
}
|
||||
|
||||
|
||||
CustomButton {
|
||||
x: 128
|
||||
y: 192
|
||||
text: "Test"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 12
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
onClicked: {
|
||||
console.log("Click");
|
||||
|
||||
if (square.visible) {
|
||||
square.visible = false
|
||||
} else {
|
||||
|
@ -76,7 +64,7 @@ Item {
|
|||
CustomButton {
|
||||
id: customButton2
|
||||
y: 192
|
||||
text: "Close"
|
||||
text: "Move"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
Loading…
Reference in a new issue