개정판 cd082c84
QRecognitionDialog의 QListWidget에 아이템 추가 시 자동으로 스크롤링하도록 변경
DTI_PID/DTI_PID/QRecognitionDialog.py | ||
---|---|---|
10 | 10 |
|
11 | 11 |
self.ui = Recognition_UI.Ui_Recognition() |
12 | 12 |
self.ui.setupUi(self) |
13 |
#self.ui.listWidget.itemChanged.connect(self.listItemChanged)
|
|
13 |
self.ui.listWidget.model().rowsInserted.connect(self.rowInserted) ## connect to func rowInserted(self, item)
|
|
14 | 14 |
self.isAccepted = False |
15 | 15 |
|
16 |
#def listItemChanged(self, listItem): |
|
17 |
# self.ui.listWidget.scrollToBottom() |
|
16 |
''' |
|
17 |
@brief QListWidget Row Inserted Listener |
|
18 |
Whenever row inserted, scroll to bottom |
|
19 |
@author Jeongwoo |
|
20 |
@date 18.04.12 |
|
21 |
@history . |
|
22 |
''' |
|
23 |
def rowInserted(self, item): |
|
24 |
self.ui.listWidget.scrollToBottom() |
|
18 | 25 |
|
19 | 26 |
def accept(self): |
20 | 27 |
self.isAccepted = True |
내보내기 Unified diff