V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
goodspb
V2EX  ›  Python

有在 M2 MacOS 下使用 pyside6 的朋友吗? pyside6-designer 疯狂崩溃

  •  
  •   goodspb · 2023-07-23 17:12:11 +08:00 · 1467 次点击
    这是一个创建于 485 天前的主题,其中的信息可能已经有所发展或是发生改变。

    当我打开界面创建了一个 MainWindows 之后,每当我点击 MainWindow 的时候,就会崩溃。

    python3.9 使用 pip install 安装的 pyside6

    错误日志:

    Error: qt.pysideplugin: Environment variable PYSIDE_DESIGNER_PLUGINS is not set, bailing out.
    qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
    Qt Designer: The QWebEngineView custom widget plugin is disabled because it requires OpenGL/Software RHI (current: 6).
    Qt Designer: The QWebEngineView custom widget plugin is disabled because it requires OpenGL/Software RHI (current: 6).
    QtLocalePropertyManager::valueText: Unknown territory 50 for English
    2023-07-23 17:10:24.920 Designer[44759:1878516] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 2 beyond bounds for empty array'
    *** First throw call stack:
    (
    	0   CoreFoundation                      0x000000019617f154 __exceptionPreprocess + 176
    	1   libobjc.A.dylib                     0x0000000195c9e4d4 objc_exception_throw + 60
    	2   CoreFoundation                      0x00000001962699b8 -[__NSCFString characterAtIndex:].cold.1 + 0
    	3   CoreFoundation                      0x00000001960f2bb8 -[__NSArrayM objectAtIndexedSubscript:] + 188
    	4   libqcocoa.dylib                     0x00000001046f8124 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 269336
    	5   libqcocoa.dylib                     0x00000001046f81a8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 269468
    	6   libqcocoa.dylib                     0x00000001046f677c _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 262768
    	7   QtWidgets                           0x0000000104ba9354 _ZN9QTreeView16selectionChangedERK14QItemSelectionS2_ + 620
    	8   QtCore                              0x0000000105a29788 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3780
    	9   QtCore                              0x0000000105bed6a4 _ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2_ + 216
    	10  QtCore                              0x0000000105bed264 _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE + 660
    	11  QtCore                              0x0000000105bede2c _ZN19QItemSelectionModel14clearSelectionEv + 64
    	12  QtDesignerComponents                0x00000001036b2354 QtDesignerComponents + 451412
    	13  QtDesignerComponents                0x000000010366f5b8 QtDesignerComponents + 177592
    	14  QtDesignerComponents                0x0000000103682c64 QtDesignerComponents + 257124
    	15  QtCore                              0x00000001059e0138 _ZN23QCoreApplicationPrivate34sendThroughApplicationEventFiltersEP7QObjectP6QEvent + 228
    	16  QtWidgets                           0x00000001048bcf2c _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 80
    	17  QtWidgets                           0x00000001048bf03c _ZN12QApplication6notifyEP7QObjectP6QEvent + 5100
    	18  QtCore                              0x00000001059dff88 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
    	19  QtWidgets                           0x00000001048bd58c _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 808
    	20  QtWidgets                           0x000000010491a9b0 _ZNK21QWidgetRepaintManager3rhiEv + 9912
    	21  QtWidgets                           0x0000000104919c68 _ZNK21QWidgetRepaintManager3rhiEv + 6512
    	22  QtWidgets                           0x00000001048bcfec _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
    	23  QtWidgets                           0x00000001048bde50 _ZN12QApplication6notifyEP7QObjectP6QEvent + 512
    	24  QtCore                              0x00000001059dff88 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
    	25  QtGui                               0x0000000103d6e794 _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 1748
    	26  QtGui                               0x0000000103dc5aa4 _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 396
    	27  libqcocoa.dylib                     0x000000010469bd40 qt_plugin_instance + 54740
    	28  CoreFoundation                      0x000000019610663c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    	29  CoreFoundation                      0x00000001961065d0 __CFRunLoopDoSource0 + 176
    	30  CoreFoundation                      0x0000000196106340 __CFRunLoopDoSources0 + 244
    	31  CoreFoundation                      0x0000000196104f48 __CFRunLoopRun + 828
    	32  CoreFoundation                      0x00000001961044b8 CFRunLoopRunSpecific + 612
    	33  HIToolbox                           0x000000019f94ec40 RunCurrentEventLoopInMode + 292
    	34  HIToolbox                           0x000000019f94e8d0 ReceiveNextEventCommon + 220
    	35  HIToolbox                           0x000000019f94e7d4 _BlockUntilNextEventMatchingListInModeWithFilter + 76
    	36  AppKit                              0x0000000199325d44 _DPSNextEvent + 636
    	37  AppKit                              0x0000000199324ee0 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
    	38  AppKit                              0x0000000199319344 -[NSApplication run] + 464
    	39  libqcocoa.dylib                     0x000000010469a644 qt_plugin_instance + 48856
    	40  QtCore                              0x00000001059e98fc _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 532
    	41  QtCore                              0x00000001059e0614 _ZN16QCoreApplication4execEv + 112
    	42  Designer                            0x0000000102cb99b8 main + 104
    	43  dyld                                0x0000000195ccff28 start + 2236
    )
    libc++abi: terminating due to uncaught exception of type NSException
    
    while executing '/Users/xxxx/py-src/test_pyside6/venv/lib/python3.9/site-packages/PySide6/Designer.app/Contents/MacOS/Designer'
    
    Process finished with exit code 250
    

    就是图中的红色部分:

    4 条回复    2023-11-08 19:50:51 +08:00
    NoOneNoBody
        1
    NoOneNoBody  
       2023-07-23 18:02:23 +08:00   ❤️ 1
    because it requires OpenGL/Software RHI (current: 6)

    这句写了原因了,非 mac 用户,所以不知道系统是否支持

    qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
    看样子要装插件,你再去搜搜文章找解决办法,关键字带上系统
    Oilybear
        2
    Oilybear  
       2023-07-24 10:07:45 +08:00   ❤️ 1
    以前有遇到过,我记得装的 designer 好像是 pyside2 的,我的建议找个 win 的机器设计 UI 就好,mac 的 designer 窗口都没设计到一起,太反人类了
    goodspb
        3
    goodspb  
    OP
       2023-07-24 11:29:00 +08:00
    @NoOneNoBody
    @Oilybear

    感谢感谢,最后还是得下载个 QT Creator 用里面的 designer 才可以。太折腾了,感觉 pyside 这块不是很友好(或者只是我不懂 😭
    Andywoo
        4
    Andywoo  
       2023-11-08 19:50:51 +08:00
    designer 确实不好用,我都是手码界面😭
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5348 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:36 · PVG 16:36 · LAX 00:36 · JFK 03:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.