1
嗨我在Qt5中编写多语言应用程序。我想访问Qt5如何从另一个类调用QApplication?
QApplication a(argc, argv);
本地化在我的Settings类的main.cpp中。 我需要这个来执行两个命令:
a.installTranslator();
a.removeTranslattor();
,当我试图做这样做我得到的错误:
C2228: left of '.installTranslator' must have class/struct/union
C2228: left of '.removeTranslator' must have class/struct/union
我怎么能打电话吗?
可能https://en.wikipedia.org/wiki/Most_vexing_parse – Drop
请提供[M(C)已经](HTTP: //stackoverflow.com/help/mcve) – Drop
我已经解决了我的问题。现在我正在通过qApp课程获得QApplication。对不起,我浪费了你的时间。 – km2442