Example #1
0
 def _make_widget(self):
     from PyQt5.QtWidgets import QStatusBar, QSizePolicy, QLabel
     sb = QStatusBar()
     sb.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Preferred)
     sb._primary_status_label = QLabel()
     sb._secondary_status_label = QLabel()
     sb.addWidget(sb._primary_status_label)
     sb.addPermanentWidget(sb._secondary_status_label)
     return sb
Example #2
0
 def _make_widget(self):
     from PyQt5.QtWidgets import QStatusBar, QSizePolicy, QWidget
     sb = QStatusBar()
     sb.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Preferred)
     from PyQt5.QtGui import QWindow, QSurface
     self._window = pw = QWindow()
     pw.exposeEvent = self._expose_event
     pw.resizeEvent = self._resize_event
     pw.keyPressEvent = self.session.ui.forward_keystroke
     pwidget = QWidget.createWindowContainer(pw, sb)
     pw.setSurfaceType(QSurface.OpenGLSurface)
     sb.addWidget(pwidget, stretch = 1)
     return sb