def initUI(self): movie = QtGui.QMovie(Paths.help_add_event) self.hintLbl.setMovie(movie) movie.start() overlayLayout = Overlay("center") overlayLayout.addWidget(self.hintLbl) center = OverlayCenter(self) center.addLayout(overlayLayout) self.setFixedWidth(200)
def initUI(self): # Set up the hintLbl overlay movie = QtGui.QMovie(Paths.help_drag_command) self.hintLbl.setMovie(movie) movie.start() overlayLayout = Overlay("center") overlayLayout.addWidget(self.hintLbl) center = OverlayCenter(self) center.addLayout(overlayLayout) # Other UI stuff self.setLocked(False) # Initializes the drag/drop functionality and more self.setMinimumWidth(self.minimumWidth)
def __init__(self, vStream, parent, fps=24.0): super(CameraWidget, self).__init__(parent) # Set up globals self.vStream = vStream self.fps = fps # The maximum FPS the widget will update at self.paused = True # Keeps track of the video's state self.timer = QtCore.QTimer() self.lastFrameID = None self.timer.timeout.connect(self.nextFrameSlot) # Initialize UI Variables self.frameLbl = QtWidgets.QLabel() self.hintLbl = QtWidgets.QLabel() self.mainVLayout = QtWidgets.QVBoxLayout(self) # Global because subclasses need it self.mainHLayout = QtWidgets.QHBoxLayout() # Initialize UI movie = QtGui.QMovie(Paths.help_connect_camera) self.frameLbl.setMovie(movie) movie.start() self.mainHLayout.setContentsMargins(0, 0, 0, 0) self.mainVLayout.setContentsMargins(0, 0, 0, 0) self.mainHLayout.addWidget(self.frameLbl) self.mainHLayout.addStretch(1) self.mainVLayout.addLayout(self.mainHLayout) self.setLayout(self.mainVLayout) from CommonGUI import Overlay, OverlayCenter overlayLayout = Overlay("center") overlayLayout.addWidget(QtWidgets.QLabel("AYYYYrrrrrrrrrrrrrrrrrrrrrrrrrrrrrfrrrrAYYYYrrrrrrrrrrrrrrrrrrrrrrrrrrrrrfrrrrAYYYYrrrrrrrrrrrrrrrrrrrrrrrrrrrrrfrrrrAYYYYrrrrrrrrrrrrrrrrrrrrrrrrrrrrrfrrrrAYYYYrrrrrrrrrrrrrrrrrrrrrrrrrrrrrfrrrrrrrrrrrrrrrrrrrrrrrrYYY LMAO")) center = OverlayCenter(self) center.addLayout(overlayLayout) self.mainVLayout.addLayout(center)