Skip to content

Commit ae9b7bf

Browse files
committed
Update
1 parent 6c2aa43 commit ae9b7bf

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

Temp/Note.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
https://doc.qt.io/qtforpython/quickstart.html
2+
https://doc.qt.io/qtforpython/tutorials/qmlapp/qmlapplication.html
3+
4+
conda create --name py_env
5+
conda activate py_env
6+
pip install pyside6
7+
8+
C:\Users\Admin\anaconda3
9+
C:\Users\Admin\anaconda3\Scripts
10+
C:\Users\Admin\anaconda3\Library\bin

Temp/main.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# import sys
2+
3+
# from PySide6.QtGui import QGuiApplication
4+
# from PySide6.QtQml import QQmlApplicationEngine
5+
6+
7+
# app = QGuiApplication(sys.argv)
8+
9+
# engine = QQmlApplicationEngine()
10+
# engine.quit.connect(app.quit)
11+
# engine.load('main.qml')
12+
13+
# sys.exit(app.exec_())
14+
import sys
15+
16+
from PyQt6.QtGui import QGuiApplication
17+
from PyQt6.QtQml import QQmlApplicationEngine
18+
19+
20+
app = QGuiApplication(sys.argv)
21+
22+
engine = QQmlApplicationEngine()
23+
engine.quit.connect(app.quit)
24+
engine.load('main.qml')
25+
26+
sys.exit(app.exec())

Temp/main.qml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import QtQuick 2.15
2+
import QtQuick.Controls 2.15
3+
4+
ApplicationWindow {
5+
visible: true
6+
width: 600
7+
height: 500
8+
title: "HelloApp"
9+
10+
Text {
11+
anchors.centerIn: parent
12+
text: "Hello World"
13+
font.pixelSize: 24
14+
}
15+
16+
}

0 commit comments

Comments
 (0)