QComboBox.findData() compatible with pyside
This commit is contained in:
parent
59049f8e8b
commit
39fe1b8e9f
|
@ -99,10 +99,11 @@ def createSupportMessage(myapp):
|
|||
return
|
||||
|
||||
myapp.ui.lineEditSubject.setText(SUPPORT_SUBJECT)
|
||||
addrIndex = myapp.ui.comboBoxSendFrom.findData(
|
||||
address, QtCore.Qt.UserRole,
|
||||
QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive
|
||||
)
|
||||
# addrIndex = myapp.ui.comboBoxSendFrom.findData(
|
||||
# address, QtCore.Qt.UserRole,
|
||||
# QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive
|
||||
# )
|
||||
addrIndex = myapp.ui.comboBoxSendFrom.findData(address)
|
||||
if addrIndex == -1: # something is very wrong
|
||||
return
|
||||
myapp.ui.comboBoxSendFrom.setCurrentIndex(addrIndex)
|
||||
|
|
Reference in New Issue
Block a user