lzx1413 / labelImgPlus

:metal: LabelImgPlus is a graphical image annotation tool which supports CLS,DET and SEG
210 stars 51 forks source link

AttributeError: 'QListWidget' object has no attribute 'setItemSelected' #14

Open td43 opened 2 years ago

td43 commented 2 years ago

Hi there.

When i press click on an image in the list i got this message in console.

I am running python 3.8 pyqt5 on ubuntu focal 20.04

Traceback (most recent call last):
  File "labelImg.py", line 803, in fileitemDoubleClicked
    self.loadFile(filename)
  File "labelImg.py", line 1256, in loadFile
    self.fileListWidget.setItemSelected(fileWidgetItem, True)
AttributeError: 'QListWidget' object has no attribute 'setItemSelected'
Traceback (most recent call last):
  File "labelImg.py", line 803, in fileitemDoubleClicked
    self.loadFile(filename)
  File "labelImg.py", line 1256, in loadFile
    self.fileListWidget.setItemSelected(fileWidgetItem, True)
AttributeError: 'QListWidget' object has no attribute 'setItemSelected'
lantudou commented 1 year ago

According to https://doc.qt.io/qt-5/qlistwidget-obsolete.html

This function setItemSelected was obsolete. please use: fileWidgetItem.setSelected(True) to replace that