-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
PyQt4 code:
from PyQt4 import QtCore, QtGui
class Test(QtGui.QDialog):
def set_filepath(self):
self.filePathEdit.setText(
QtGui.QFileDialog.getOpenFileName(
self,
"Choose file",
self.filePathEdit.text()))results in
from PyQt5 import QtCore, QtGui, QtWidgets
class Test(QtWidgets.QDialog):
def set_filepath(self):
self.filePathEdit.setText(
QtWidgets.QFileDialog.getOpenFileName(
self,
"Choose file",
self.filePathEdit.text()))[0]See, the [0] should be before the last parenthesis.
self.filePathEdit.setText(
QtWidgets.QFileDialog.getOpenFileName(
self,
"Choose file",
self.filePathEdit.text())[0]) # <--- hereLooks like an issue in find_closing_parenthesis.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels