Skip to content

Instantly share code, notes, and snippets.

View erdurano's full-sized avatar

Oğuzcan Erduran erdurano

  • Istanbul/Turkey
View GitHub Profile
@dridk
dridk / qml_model_python.py
Created December 29, 2020 22:51
qml and python model integration with PySide2
from PySide2.QtWidgets import *
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtQuick import QQuickView
import sys
import random
class PlayerModel(QAbstractListModel):
"""
@akdasa
akdasa / app.py
Last active November 13, 2022 18:48
Create QML component dynamically from Python
import sys
from PyQt5.QtCore import QUrl, pyqtProperty, pyqtSignal
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQml import QQmlApplicationEngine
from PyQt5.QtQml import qmlRegisterType, QQmlComponent
from PyQt5.QtQuick import QQuickItem