문제

I'm actually creating an application in QtCreator (open source), and I need to open Excel and communicate by sending to Excel data to show. I try to #include <QAxWidget> , and to modify my .pro file with:

CONFIG+= axcontainer
Qt += activeqt

But it didn't work. I've got the error QAxWidget was not declared in this scope. I read lots of things contradictory on the Internet, like you must paid licence or else.

Can you explain to me, if there's a way to solve my problem? Thanks.

도움이 되었습니까?

해결책

You need the "Qt5-way" of using the module from your project file:

QT += axcontainer

Also, you need to include the necessary header of course:

#include <QAxWidget>

You can find the more thorough explanation here with examples.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top