eric7/Project/ProjectBaseBrowser.py

branch
eric7
changeset 8324
83084f088655
parent 8318
962bce857696
child 8356
68ec9c3d4de5
equal deleted inserted replaced
8323:3bb9b7d997db 8324:83084f088655
176 176
177 @param index index of item to be selected (QModelIndex) 177 @param index index of item to be selected (QModelIndex)
178 """ 178 """
179 if index.isValid(): 179 if index.isValid():
180 self.setCurrentIndex(index) 180 self.setCurrentIndex(index)
181 flags = QItemSelectionModel.SelectionFlags( 181 self.selectionModel().select(
182 index,
182 QItemSelectionModel.SelectionFlag.ClearAndSelect | 183 QItemSelectionModel.SelectionFlag.ClearAndSelect |
183 QItemSelectionModel.SelectionFlag.Rows 184 QItemSelectionModel.SelectionFlag.Rows
184 ) 185 )
185 self.selectionModel().select(index, flags)
186 186
187 def _setItemSelected(self, index, selected): 187 def _setItemSelected(self, index, selected):
188 """ 188 """
189 Protected method to set the selection status of an item. 189 Protected method to set the selection status of an item.
190 190

eric ide

mercurial