qml: hook any qml supporting plugins, add test plugin
This allows different platforms to have their own UI components while still leveraging the common set of QObjects and utility components.
This commit is contained in:
5
electrum/plugins/qml_test/__init__.py
Normal file
5
electrum/plugins/qml_test/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from electrum.i18n import _
|
||||
|
||||
fullname = 'QML Plugin Test'
|
||||
description = '%s\n%s' % (_("Plugin to test QML integration from plugins."), _("Note: Used for development"))
|
||||
available_for = ['qml']
|
||||
12
electrum/plugins/qml_test/qml.py
Normal file
12
electrum/plugins/qml_test/qml.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import os
|
||||
from PyQt5.QtCore import QUrl
|
||||
from PyQt5.QtQml import QQmlApplicationEngine
|
||||
from electrum.plugin import hook, BasePlugin
|
||||
|
||||
class Plugin(BasePlugin):
|
||||
def __init__(self, parent, config, name):
|
||||
BasePlugin.__init__(self, parent, config, name)
|
||||
|
||||
@hook
|
||||
def init_qml(self, engine: QQmlApplicationEngine):
|
||||
pass
|
||||
Reference in New Issue
Block a user