83 Public method to append a given message to the bottom most message box. |
83 Public method to append a given message to the bottom most message box. |
84 |
84 |
85 @param message message text to be appended |
85 @param message message text to be appended |
86 @type str |
86 @type str |
87 """ |
87 """ |
88 msgBox = self.__messagesLayout.itemAt( |
88 if self.__messagesLayout.count(): |
89 self.__messagesLayout.count() - 1 |
89 msgBox = self.__messagesLayout.itemAt( |
90 ).widget() |
90 self.__messagesLayout.count() - 1 |
91 msgBox.appendMessage(message) |
91 ).widget() |
|
92 msgBox.appendMessage(message) |
92 |
93 |
93 QTimer.singleShot(0, self.__scrollChatToBottom) |
94 QTimer.singleShot(0, self.__scrollChatToBottom) |
94 |
95 |
95 @pyqtSlot() |
96 @pyqtSlot() |
96 def __scrollChatToBottom(self): |
97 def __scrollChatToBottom(self): |