Skip to content

Instantly share code, notes, and snippets.



Created Feb 26, 2020
What would you like to do?
from PySide2.QtWidgets import QApplication
from PySide2.QtCore import QUrl
import os
import sys
from PySide2.QtQml import QQmlApplicationEngine
# sys.argv += ['--style', 'material']
app = QApplication(sys.argv)
qml_file = os.path.join(os.path.dirname(__file__), "main.qml")
view =QQmlApplicationEngine(parent=app)
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.3
import Qt.labs.platform 1.1 as Platform
import QtQuick.Window 2.14
import Qt.labs.settings 1.1
import QtQuick.Controls.Material 2.14
import QtGraphicalEffects 1.14
import QtQuick.Dialogs 1.3 as Dialogs
ApplicationWindow {
flags: Qt.FramelessWindowHint
id: main
Dialogs.Dialog {
title: "Title"
id: dialog
visible: true
standardButtons: Dialog.Cancel | Dialog.Open
Label {
text: 'Text'
onAccepted: console.log("Ok clicked")
onRejected: console.log("Cancel clicked")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.