当前位置: 首页>>代码示例>>Python>>正文


Python QQuickView.__init__方法代码示例

本文整理汇总了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
开发者ID:martyr-deepin,项目名称:deepin-screenshot-v3,代码行数:29,代码来源:main.py

示例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)
开发者ID:PeterDaveHello,项目名称:dss,代码行数:27,代码来源:control_panel.py

示例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"
开发者ID:steafen,项目名称:deepin-menu,代码行数:10,代码来源:main.py

示例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()
开发者ID:Jactry,项目名称:deepin-translator,代码行数:13,代码来源:window.py

示例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)
开发者ID:houzy,项目名称:deepin-movie,代码行数:19,代码来源:window.py

示例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()
开发者ID:ArthurYV,项目名称:deepin-emacs,代码行数:20,代码来源:emaf.py

示例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")))
开发者ID:EdwardBetts,项目名称:fs-uae-launcher,代码行数:24,代码来源:gamecenterview.py

示例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)))
开发者ID:Jactry,项目名称:deepin-translator,代码行数:24,代码来源:translate_interface.py

示例9: __init__

# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import __init__ [as 别名]
 def __init__(self):
     QQuickView.__init__(self)
开发者ID:HenryHu,项目名称:xmradio,代码行数:4,代码来源:gui.py


注:本文中的PyQt5.QtQuick.QQuickView.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。