WPS电子表格开发com插件,qt画面在版本12下显示白板

这个是在wps12下qt ui渲染日志 Debug: QWindowsContext::setProcessDpiAwareness 2 Warning: SetProcessDpiAwareness(2) failed: COM error 0x80070005 E_ACCESSDENIED (Unknown error 0x080070005), using 1 Debug: QWindowsIntegrationPrivate::QWindowsIntegrationPrivate DpiAwareness= 2 effective process DPI awareness= 1 Debug: QWindowsContext::registerWindowClass "QtPowerDummyWindow" style=0x0 brush=0x0 icon=false atom=50056 Critical: QApplication::regClass: Registering window class 'Qt5ClipboardView' failed. (类已存在。) Debug: QWindowsContext::registerWindowClass "Qt5ClipboardView" style=0x0 brush=0x0 icon=false atom=0 Debug: QWindowsClipboard::registerViewer m_clipboardViewer: 0x1350c9e format listener: true next: 0x0 Debug: New Monitor: Screen "\\.\DISPLAY337" 1600x900+0+0 avail: 1600x852+0+0 physical: 432x240 DPI: 96x96 Depth: 32 Format: QImage::Format_RGB32 hMonitor: 0x10001 primary virtual desktop Debug: QWindowsFontDatabase::systemDefaultFont QFont(SimSun,9,-1,5,50,0,0,0,0,0) Debug: QWindowsTheme::refreshIconPixmapSizes (QSize(16, 16), QSize(32, 32), QSize(48, 48), QSize(256, 256)) Critical: QApplication::regClass: Registering window class 'Qt5QWindowIcon' failed. (类已存在。) Debug: QWindowsContext::registerWindowClass "Qt5QWindowIcon" style=0x8 brush=0x100074 icon=true atom=0 Debug: QWindowsGeometryHint::frameOnPrimaryScreen style=0x86cf0000 exStyle=0x0 RECT(left=-8, top=-31, right=8, bottom=8 (16x39)) QMargins(8, 31, 8, 8) 在wps2019下显示正常,对于的qt ui渲染日志如下: Debug: QWindowsContext::setProcessDpiAwareness 2 Warning: SetProcessDpiAwareness(2) failed: COM error 0x80070005 E_ACCESSDENIED (Unknown error 0x080070005), using 1 Debug: QWindowsIntegrationPrivate::QWindowsIntegrationPrivate DpiAwareness= 2 effective process DPI awareness= 1 Debug: QWindowsContext::registerWindowClass "QtPowerDummyWindow" style=0x0 brush=0x0 icon=false atom=49756 Debug: QWindowsContext::registerWindowClass "Qt5ClipboardView" style=0x0 brush=0x0 icon=false atom=49929 Debug: QWindowsClipboard::registerViewer m_clipboardViewer: 0x12b08e4 format listener: true next: 0x0 Debug: New Monitor: Screen "\\.\DISPLAY1" 1600x900+0+0 avail: 1600x860+0+0 physical: 432x240 DPI: 96x96 Depth: 32 Format: QImage::Format_RGB32 hMonitor: 0x10001 primary virtual desktop Debug: New Monitor: Screen "\\.\DISPLAY2" 1920x1080+1600+-114 avail: 1920x1040+1600+-114 physical: 435x239 DPI: 96x96 Depth: 32 Format: QImage::Format_RGB32 hMonitor: 0x10003 virtual desktop Debug: QWindowsFontDatabase::systemDefaultFont QFont(SimSun,9,-1,5,50,0,0,0,0,0) Debug: QWindowsTheme::refreshIconPixmapSizes (QSize(16, 16), QSize(32, 32), QSize(48, 48), QSize(256, 256)) Debug: QWindowsContext::registerWindowClass "Qt5QWindowIcon" style=0x8 brush=0x1000a9 icon=true atom=49674 Debug: QWindowsGeometryHint::frame style=0x86cf0000 exStyle=0x0 dpi=96 RECT(left=-8, top=-31, right=8, bottom=8 (16x39)) QMargins(8, 31, 8, 8)
上海
浏览 557
收藏
7
分享
7 +1
6
+1
全部评论 6
 
zzn
插件开发的qt版本时5.14.2,看了下wps 12使用的时5.12.12开发的。两者在底层创建窗口时,公用了全局的注册类Qt5QWindowIcon,导致了插件qt界面白屏,低版本wps2016使用的qt是4的版本,全局窗口注册类不会冲突,所以使用正常。
· 上海
回复
覃欢
覃欢

@金山办公

卧槽 还有这个问题么?相关代码截个图看看 我是不是要将这个给换个名字。。。
· 广东省
回复
 
覃欢
覃欢

@金山办公

想说明啥?怎么个正常与不正常
· 广东省
回复
zzn
问题已经解决,是同一个进程下有多个不同的版本Qt大版本不兼容的问题。
· 上海
回复
 
亂雲飛渡
打卡
· 广东省
回复