@@ -175,7 +175,7 @@ def setExitEffect(self, effect, duration=500):
175175
176176 # Events
177177 @QtCore .pyqtSlot ('QString' , 'QString' , int )
178- def display (self , message , category , timeout = 0 ):
178+ def display (self , message , category , timeout = 5000 ):
179179 """ Displays a notification
180180
181181 Parameters
@@ -185,8 +185,8 @@ def display(self, message, category, timeout=0):
185185 category : str
186186 The type of notification that should be shown. Adheres to bootstrap
187187 standards which are [primary, success, info, warning, danger]
188- timeout : int (default: 0 )
189- The duration for which the notification should be shown. If 0 then
188+ timeout : int (default: 5000 )
189+ The duration for which the notification should be shown. If None then
190190 the notification will be shown indefinitely
191191 """
192192 notification = QNotification (message , category , self )
@@ -200,7 +200,7 @@ def display(self, message, category, timeout=0):
200200 notification .display ()
201201
202202 self .adjustSize ()
203- if timeout > 0 :
203+ if not timeout is None and timeout > 0 :
204204 QtCore .QTimer .singleShot (timeout ,
205205 lambda : self .remove (notification ))
206206
0 commit comments