UI/NotificationWidget.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3383
2da1760fe787
child 3656
441956d8fce5
equal deleted inserted replaced
3456:96232974dcdb 3484:645c12de6b0c
45 Qt.WindowStaysOnTopHint | \ 45 Qt.WindowStaysOnTopHint | \
46 Qt.X11BypassWindowManagerHint 46 Qt.X11BypassWindowManagerHint
47 if Globals.isWindowsPlatform(): 47 if Globals.isWindowsPlatform():
48 flags |= Qt.ToolTip 48 flags |= Qt.ToolTip
49 self.setWindowFlags(flags) 49 self.setWindowFlags(flags)
50
51 self.frame.layout().setAlignment(
52 self.verticalLayout, Qt.AlignLeft | Qt.AlignVCenter)
50 53
51 self.__timer = QTimer(self) 54 self.__timer = QTimer(self)
52 self.__timer.setSingleShot(True) 55 self.__timer.setSingleShot(True)
53 self.__timer.timeout.connect(self.close) 56 self.__timer.timeout.connect(self.close)
54 57
99 self.__timer.stop() 102 self.__timer.stop()
100 self.__timer.setInterval(self.__timeout) 103 self.__timer.setInterval(self.__timeout)
101 self.__timer.start() 104 self.__timer.start()
102 105
103 super(NotificationWidget, self).show() 106 super(NotificationWidget, self).show()
107
108 sh = self.sizeHint()
109 self.resize(max(self.width(), sh.width()), sh.height())
104 110
105 def mousePressEvent(self, evt): 111 def mousePressEvent(self, evt):
106 """ 112 """
107 Protected method to handle presses of a mouse button. 113 Protected method to handle presses of a mouse button.
108 114

eric ide

mercurial