TeroStyle - Theme initial try
This commit is contained in:
@@ -3,7 +3,7 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "qrc:/TeroStyle"
|
||||
|
||||
Item
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "qrc:/TeroStyle"
|
||||
|
||||
Window
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
//import "qrc:/TeroStyle"
|
||||
|
||||
Item
|
||||
{
|
||||
|
||||
37
TeroStyle/Button.qml
Executable file
37
TeroStyle/Button.qml
Executable file
@@ -0,0 +1,37 @@
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
T.Button
|
||||
{
|
||||
id: tsBut
|
||||
property int tsWidth: tsButtonText.width + 10
|
||||
property int tsHeight: tsButtonText.height + 8
|
||||
|
||||
height: tsHeight
|
||||
width: tsWidth
|
||||
|
||||
background: Rectangle
|
||||
{
|
||||
id: tsButton
|
||||
anchors.fill: parent
|
||||
radius: 50
|
||||
color: "red"
|
||||
|
||||
MouseArea
|
||||
{
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
onClicked: tsBut.clicked()
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: tsButtonText
|
||||
anchors.centerIn: parent
|
||||
color: "indigo"
|
||||
//font.pixelSize: 13
|
||||
font: tsBut.font
|
||||
text: tsBut.text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
TeroStyle/TeroStyle.qml
Normal file
15
TeroStyle/TeroStyle.qml
Normal file
@@ -0,0 +1,15 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Item
|
||||
{
|
||||
id: teroStyle
|
||||
anchors.fill: parent
|
||||
|
||||
|
||||
Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
color: "dodgerblue"
|
||||
}
|
||||
}
|
||||
3
TeroStyle/qmldir
Executable file
3
TeroStyle/qmldir
Executable file
@@ -0,0 +1,3 @@
|
||||
module TeroStyle
|
||||
TeroStyle 1.0 TeroStyle.qml
|
||||
Button 1.0 Button.qml
|
||||
3
main.py
3
main.py
@@ -100,7 +100,8 @@ if __name__ == "__main__":
|
||||
pyq_server = QLocalServer()
|
||||
pyq_server.listen("PYQCRM_INSTANCE")
|
||||
|
||||
engine.addImportPath("qrc:/");
|
||||
engine.addImportPath("qrc:/")
|
||||
engine.addImportPath("qrc:/Style")
|
||||
|
||||
# qml_file = Path(__file__).resolve().parent / "Gui/main.qml"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user