QComboBox.findData() compatible with pyside
This commit is contained in:
parent
aa7ba6e278
commit
58b752127d
|
@ -4,8 +4,6 @@ import sys
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from qtpy import QtCore
|
|
||||||
|
|
||||||
import account
|
import account
|
||||||
import defaults
|
import defaults
|
||||||
import network.stats
|
import network.stats
|
||||||
|
@ -100,10 +98,11 @@ def createSupportMessage(myapp):
|
||||||
return
|
return
|
||||||
|
|
||||||
myapp.ui.lineEditSubject.setText(SUPPORT_SUBJECT)
|
myapp.ui.lineEditSubject.setText(SUPPORT_SUBJECT)
|
||||||
addrIndex = myapp.ui.comboBoxSendFrom.findData(
|
# addrIndex = myapp.ui.comboBoxSendFrom.findData(
|
||||||
address, QtCore.Qt.UserRole,
|
# address, QtCore.Qt.UserRole,
|
||||||
QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive
|
# QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive
|
||||||
)
|
# )
|
||||||
|
addrIndex = myapp.ui.comboBoxSendFrom.findData(address)
|
||||||
if addrIndex == -1: # something is very wrong
|
if addrIndex == -1: # something is very wrong
|
||||||
return
|
return
|
||||||
myapp.ui.comboBoxSendFrom.setCurrentIndex(addrIndex)
|
myapp.ui.comboBoxSendFrom.setCurrentIndex(addrIndex)
|
||||||
|
|
Reference in New Issue
Block a user