本文整理汇总了Python中PyQt5.QtQuick.QQuickView.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QQuickView.__init__方法的具体用法?Python QQuickView.__init__怎么用?Python QQuickView.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtQuick.QQuickView
的用法示例。
在下文中一共展示了QQuickView.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self, settings, windowInfo):
QQuickView.__init__(self)
self._settings = settings
surface_format = QSurfaceFormat()
surface_format.setAlphaBufferSize(8)
self.set_cursor_shape("shape_start_cursor")
self.setColor(QColor(0, 0, 0, 0))
self.setFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint)
self.setResizeMode(QQuickView.SizeRootObjectToView)
self.setFormat(surface_format)
self.setTitle(_("Deepin screenshot"))
self.qimage = QImage(self._settings.tmpImageFile)
self.qpixmap = QPixmap()
self.qpixmap.convertFromImage(self.qimage)
self.window_info = windowInfo
self._grabPointerStatus = False
self._grabKeyboardStatus = False
self._grabFocusTimer = self._getGrabFocusTimer()
self._osdShowed = False
self._osdShowing = False
self._quitOnOsdTimeout = False
示例2: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self):
QQuickView.__init__(self)
surface_format = QSurfaceFormat()
surface_format.setAlphaBufferSize(8)
self.setColor(QColor(0, 0, 0, 0))
self.setFlags(
Qt.Tool
| Qt.FramelessWindowHint
| Qt.WindowStaysOnTopHint
| Qt.X11BypassWindowManagerHint
)
self.setResizeMode(QQuickView.SizeRootObjectToView)
self.setFormat(surface_format)
self.set_all_contexts()
self.setSource(QUrl.fromLocalFile(os.path.join(
ROOT_LOCATION, 'frame', 'views', 'Main.qml')))
self.connect_all_object_function()
self.engine_obj = self.engine()
connect_to_primary_changed(self.display_primary_changed)
self._dbus_adptor = DssDbusAdptor(self)
qApp.focusWindowChanged.connect(self.onFocusWindowChanged)
示例3: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self, x, y, menuJsonContent, withCorner):
QQuickView.__init__(self)
self.__x = x
self.__y = y
self.__menuJsonContent = menuJsonContent
self.__withCorner = withCorner
self._cornerDirection = "down"
示例4: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self):
QQuickView.__init__(self)
surface_format = QSurfaceFormat()
surface_format.setAlphaBufferSize(8)
self.setColor(QColor(0, 0, 0, 0))
self.setFlags(QtCore.Qt.FramelessWindowHint)
self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
self.setFormat(surface_format)
self.qml_context = self.rootContext()
示例5: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self, center=False):
QQuickView.__init__(self)
self._center_request_count = 1 if center else 0
surface_format = QSurfaceFormat()
surface_format.setAlphaBufferSize(8)
self.setColor(QColor(0, 0, 0, 0))
self.setMinimumSize(QSize(MINIMIZE_WIDTH, MINIMIZE_HEIGHT))
self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
self.setFormat(surface_format)
self.staysOnTop = False
self.qml_context = self.rootContext()
self.setTitle(_("Deepin Movie"))
self.setIcon(icon_from_theme("Deepin", "deepin-movie"))
self.setDeepinWindowShadowHint(self.windowGlowRadius)
示例6: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self, emacs_xid, init_width, init_height):
QQuickView.__init__(self)
surface_format = QSurfaceFormat()
surface_format.setAlphaBufferSize(8)
self.setColor(QColor(0, 0, 0, 0))
self.setFlags(QtCore.Qt.FramelessWindowHint)
self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
self.setFormat(surface_format)
self.qml_context = self.rootContext()
self.emacs_xid = int(emacs_xid)
self.emacs_width = int(init_width)
self.emacs_height = int(init_height)
self.show()
示例7: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self, parent=None):
QQuickView.__init__(self, parent)
if getattr(sys, "frozen", ""):
qml_path = os.path.join(app.executable_dir(), "qml")
else:
qml_path = os.path.expanduser("~/git/fs-uae/fs-uae-launcher/qml")
engine = self.engine()
print(engine.importPathList())
print(engine.pluginPathList())
# engine.setPluginPathList([qml_path, "."])
# engine.addPluginPath(qml_path)
# engine.addImportPath(qml_path)
# engine.setPluginPathList([qml_path, "."])
# engine.setImportPathList([qml_path])
# engine.addPluginPath(qml_path)
# print("setImportPathList", [QUrl.fromLocalFile(qml_path)])
self.setSource(QUrl.fromLocalFile(
os.path.join(qml_path, "ScaledUserInterface.qml")))
示例8: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self, qml_file):
QQuickView.__init__(self)
surface_format = QSurfaceFormat()
surface_format.setAlphaBufferSize(8)
self.setColor(QColor(0, 0, 0, 0))
self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
self.setFormat(surface_format)
self.setFlags(QtCore.Qt.Popup)
self.qml_context = self.rootContext()
self.init_translate_info()
self.qml_context.setContextProperty("translateInfo", self.translate_info)
self.qml_context.setContextProperty("windowView", self)
self.qml_context.setContextProperty("settingConfig", setting_config)
self.qml_context.setContextProperty("qApp", qApp)
self.setSource(QtCore.QUrl.fromLocalFile(os.path.join(get_parent_dir(__file__), qml_file)))
示例9: __init__
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
def __init__(self):
QQuickView.__init__(self)