赞
踩
import platform
os.environ['QT_MAC_WANTS_LAYER'] = '1'
Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication.
if __name__ == "__main__":
# 加上这句
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts)
app = QtWidgets.QApplication(sys.argv)
widget = Main()
widget.setWindowTitle("AI预测测试客户端")
widget.show()
sys.exit(app.exec_())
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。