Skip to content

Instantly share code, notes, and snippets.

@seanwu1105
Created March 22, 2018 07:29
Show Gist options
  • Save seanwu1105/1d77d2cab49e3fa27e344861bbb52fed to your computer and use it in GitHub Desktop.
Save seanwu1105/1d77d2cab49e3fa27e344861bbb52fed to your computer and use it in GitHub Desktop.
NO! It cannot be pyinstallered!
import QtQuick 2.0
import QtQuick.Controls 2.1
import QtQuick.Controls.Material 2.1
ApplicationWindow {
visible: true
Material.theme: Material.Dark
Material.accent: Material.Purple
Column {
anchors.centerIn: parent
RadioButton { text: qsTr("Small") }
RadioButton { text: qsTr("Medium"); checked: true }
RadioButton { text: qsTr("Large") }
}
}
import os
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QUrl
from PyQt5.QtQml import QQmlApplicationEngine
if __name__ == "__main__":
app = QApplication(sys.argv)
os.environ["QT_QUICK_CONTROLS_STYLE"] = "Material"
engine = QQmlApplicationEngine()
engine.load(QUrl('basic.qml'))
sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment