it is not safe to use pixmap outside the GUI thread
采用setStylesheet重新定义控件的样式,
结果发现在第二次使用setStylesheet的时候出现“it is not safe to use pixmap outside the GUI thread”的错误提示,可是我并没有使用pixmap啊?
[解决办法]
你在线程中设置?
[解决办法]
安全问题啊 哥
[解决办法]
不要在 非主线程 内作GUI操作,比如setStylesheet
[解决办法]
QPixmap不适用在线程里,原因忘了,好像是QPixmap和设备相关的。用QImage替代。