标题:pyqt5做图像显示时报错
取消只看楼主
浅湾
Rank: 1
等 级:新手上路
帖 子:8
专家分:7
注 册:2020-5-27
结帖率:100%
 问题点数:0 回复次数:0 
pyqt5做图像显示时报错
def openimage(self):
        imgName, imgType = QFileDialog.getOpenFileName(self, "打开图片", "./", "*.jpg;;*.png;;All Files(*)")



报错:Traceback (most recent call last):
  File "new1.py", line 19, in openimage
    imgName, imgType = QFileDialog.getOpenFileName(self, "打开图片", "./", "*.jpg;;*.png;;All Files(*)")
TypeError: getOpenFileName(parent: QWidget = None, caption: str = '', directory: str = '', filter: str = '', initialFilter: str = '', options: Union[QFileDialog.Options, QFileDialog.Option] = 0): argument 1 has unexpected type 'Ui_MainWindow'
搜索更多相关主题的帖子: str 图像 jpg 显示 报错 
2020-06-03 17:09



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-501948-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.638941 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved