小编J91*_*321的帖子

pip安装PyQt IOError

我正在尝试使用pip安装PyQt包,但是我收到此错误:

~$ pip install PyQt

Downloading/unpacking PyQt  
Downloading PyQt-x11-gpl-4.8.3.tar.gz
(9.8Mb): 9.8Mb downloaded   Running
setup.py egg_info for package PyQt
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
    IOError: [Errno 2] No such file or directory:
'/home/john/build/PyQt/setup.py'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in
<module>

IOError: [Errno 2] No such file or
directory:
'/home/john/build/PyQt/setup.py

---------------------------------------- Command python setup.py egg_info
failed with error code 1 Storing
complete log in
/home/john/.pip/pip.log
Run Code Online (Sandbox Code Playgroud)

python pip pyqt ioerror setup.py

29
推荐指数
3
解决办法
2万
查看次数

pyqt QtGui.QListWidget.currentItem(QtGui.QListWidget())始终为None

我在我的应用程序中有QListWidget,我需要从QListWidget获取项目的字符串值,用户双击该项目(激活项目).

QtCore.QObject.connect(self.ui.listWidget, QtCore.SIGNAL("itemActivated (QListWidgetItem *)"), self.cas_dialog_spust)

def cas_dialog_spust(self):
    predmet = QtGui.QListWidget.currentItem(QtGui.QListWidget())
    print(predmet)
    strpredmet = QtGui.QListWidgetItem.text(QtGui.QListWidgetItem(predmet))
    print(strpredmet) 
Run Code Online (Sandbox Code Playgroud)

当我实际运行它时,我双击QListWidget中的Item,predmet是None,我真的不知道为什么.

pyqt qlistwidget

0
推荐指数
1
解决办法
8234
查看次数

标签 统计

pyqt ×2

ioerror ×1

pip ×1

python ×1

qlistwidget ×1

setup.py ×1