MCPcopy Create free account
hub / github.com/PyQt5/PyQt / __init__

Method __init__

Demo/ShowFrameWhenDrag.py:55–63  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

53class Window(QWidget):
54
55 def __init__(self, *args, **kwargs):
56 super(Window, self).__init__(*args, **kwargs)
57 layout = QVBoxLayout(self)
58 layout.addWidget(QLabel('拖动或者调整窗口试试看'))
59
60 # 重点替换窗口处理过程
61 self._newwndproc = WNDPROC(self._wndproc)
62 self._oldwndproc = SetWindowLong(
63 int(self.winId()), GWL_WNDPROC, self._newwndproc)
64
65 def _wndproc(self, hwnd, msg, wparam, lparam):
66 if msg == WM_NCLBUTTONDOWN:

Callers

nothing calls this directly

Calls 1

addWidgetMethod · 0.80

Tested by

no test coverage detected