Compare commits

..

2 Commits

3 changed files with 41 additions and 11 deletions

View File

@ -0,0 +1,33 @@
import QtQuick
Rectangle {
id: button
property string text: "<placeholder>"
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
width: parent.width * 0.25
height: parent.height * 0.1
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
color: clickablearea.pressed ? "dimgrey" : "gray"
radius: 2
Text
{
color: myPalette.buttonText
text: button.text
anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignHCenter
width: parent.width
wrapMode: Text.Wrap
}
MouseArea
{
id: clickablearea
anchors.fill: parent
onClicked: { console.error("Hehehe") }
}
}

View File

@ -21,6 +21,7 @@ qt_add_qml_module(appProject-Orion
SOURCES userlist.h userlist.cpp
SOURCES serialization.h
SOURCES serialization.cpp
QML_FILES Button.qml
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.

View File

@ -4,20 +4,16 @@ Window {
width: 640
height: 480
visible: true
title: qsTr("Lifespan viewer")
title: "Lifespan viewer"
minimumWidth: 200
minimumHeight: 150
Rectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
Text {
id: emptyText
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("This view is currently empty :(")
height: parent.height
}
color: myPalette.window
Button
{
text: "For testing purposes"
}
}