howtrader icon indicating copy to clipboard operation
howtrader copied to clipboard

按教程安装的qt报错,找不到问题在哪,请指教!

Open delphifans8 opened this issue 2 years ago • 4 comments

Traceback (most recent call last): File "C:\Users\Administrator\Desktop\learnhowtrader\main_window.py", line 80, in main() File "C:\Users\Administrator\Desktop\learnhowtrader\main_window.py", line 52, in main qapp = create_qapp() File "C:\ProgramData\Anaconda3\envs\mytrader\lib\site-packages\howtrader\trader\ui\qt.py", line 28, in create_qapp qapp.setStyleSheet(qdarkstyle.load_stylesheet(qt_api="pyside6")) File "C:\ProgramData\Anaconda3\envs\mytrader\lib\site-packages\qdarkstyle_init_.py", line 364, in load_stylesheet stylesheet = load_stylesheet(qt_api=qt_api, palette=palette) File "C:\ProgramData\Anaconda3\envs\mytrader\lib\site-packages\qdarkstyle_init.py", line 237, in _load_stylesheet from qtpy.QtCore import QCoreApplication, QFile, QTextStream File "C:\ProgramData\Anaconda3\envs\mytrader\lib\site-packages\qtpy\QtCore.py", line 116, in Qt.MidButton = Qt.MouseButton.MiddleButton = Qt.MiddleButton File "shibokensupport/enum_310.py", line 529, in setattr AttributeError: Cannot reassign members.

delphifans8 avatar Oct 15 '22 09:10 delphifans8

please use the Pyside6 version 6.2.2, the latest version will be 6.4.0. solution: pip install Pyside6==6.2.2

51bitquant avatar Oct 19 '22 03:10 51bitquant

We recommend you to use the python version 3.9, and the PySide Version 6.2.2 and doesn't work well with the latest version 6.4.4 or later.

51bitquant avatar Nov 21 '22 07:11 51bitquant

We recommend you to use the python version 3.9, and the PySide Version 6.2.2 and doesn't work well with the latest version 6.4.4 or later.

老大,我用howtrader3.4.1,PySide6==6.5.1.1也遇到这个问题了,当我换成PySide6==6.2.2时报了错误“ImportError: cannot import name 'QtGui' from 'PySide6' (unknown location)”,6.2.2把QtGui移除了,老大怎么解决啊?

amangqq avatar Jun 04 '24 02:06 amangqq

用Python3.11或以上版本

来自阿里邮箱Android客户端------------------------------------------------------------------ @.> 日 期:2024年06月04日 10:44:21 @.> @.>; @.> 主 题:Re: [51bitquant/howtrader] 按教程安装的qt报错,找不到问题在哪,请指教! (Issue #21)

We recommend you to use the python version 3.9, and the PySide Version 6.2.2 and doesn't work well with the latest version 6.4.4 or later. 老大,我用howtrader3.4.1,PySide6==6.5.1.1也遇到这个问题了,当我换成PySide6==6.2.2时报了错误“ImportError: cannot import name 'QtGui' from 'PySide6' (unknown location)”,6.2.2把QtGui移除了,老大怎么解决啊? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

51bitquant avatar Jun 07 '24 22:06 51bitquant