예제 #1
0
#     import PySide
#     # noinspection PyUnresolvedReferences
#     from PySide import QtCore
#     # noinspection PyUnresolvedReferences
#     from PySide.QtGui import *
#     # noinspection PyUnresolvedReferences
#     from PySide.QtCore import *
# else:
#     print("USAGE:")
#     print("  qt.py pyqt4")
#     print("  qt.py pyqt5")
#     print("  qt.py pyside")
#     sys.exit(1)

# Fix for PyCharm hints warnings when using static methods
WindowUtils = cef.WindowUtils()

# Platforms
WINDOWS = (platform.system() == "Windows")
LINUX = (platform.system() == "Linux")
MAC = (platform.system() == "Darwin")

# Configuration
WIDTH = 800
HEIGHT = 600

# OS differences
CefWidgetParent = QWidget
if LINUX and (PYQT4 or PYSIDE):
    # noinspection PyUnresolvedReferences
    CefWidgetParent = QX11EmbedContainer
예제 #2
0
파일: utils.py 프로젝트: RunningJimmy/HMS
 def focusInEvent(self, event):
     # This event seems to never get called on Linux, as CEF is
     # stealing all focus due to Issue #284.
     if self.browser:
         cef.WindowUtils().OnSetFocus(self.getHandle(), 0, 0, 0)
         self.browser.SetFocus(True)
예제 #3
0
파일: main.py 프로젝트: hssgg/Mimir
    def on_size(self, event):
        if not self.browser:
            return
        cef.WindowUtils().OnSize(self.browser_panel.GetHandle(), 0, 0, 0)

        self.browser.NotifyMoveOrResizeStarted()
예제 #4
0
파일: utils.py 프로젝트: RunningJimmy/HMS
 def resizeEvent(self, event):
     size = event.size()
     if self.browser:
         if WINDOWS:
             cef.WindowUtils().OnSize(self.getHandle(), 0, 0, 0)
         self.browser.NotifyMoveOrResizeStarted()