QComboBox.findData() compatible with pyside

This commit is contained in:
Dmitri Bogomolov 2018-02-23 15:42:50 +02:00
parent 6c134d0a08
commit a8c7edef89
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
1 changed files with 5 additions and 5 deletions

View File

@ -6,8 +6,6 @@ import ssl
import sys
import time
from qtpy import QtCore
import account
import defaults
import network.stats
@ -117,9 +115,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)