def __init__(self, url=None, parent=None): QWidget.__init__(self, parent) self.vncView = VncView(None, QUrl(url)) self.vncView.installEventFilter(self) mainLayout = QHBoxLayout() mainLayout.setContentsMargins(0, 0, 0, 0) mainLayout.setSpacing(0) mainLayout.addWidget(self.vncView) self.setLayout(mainLayout) self.setFixedSize(QSize(320, 480)) self.vncView.mouseLeftButtonClicked.connect(self.mouseLeftButtonClicked)