4

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.

László Papp
  • 51,870
  • 39
  • 111
  • 135
Evans Belloeil
  • 2,413
  • 7
  • 43
  • 76
  • "But it didn't work" ? Please be much specific - what does not work? Errors, logs etc. are appreciated. – vahancho Jun 05 '14 at 06:54
  • @Final Contest : Yep I edit it, but the error is not revelant, because this is just a try, and I don't really know how to do, I just add library and pray, but if someone can give me a good method or explanation. I'm on QT5 Windows 7. – Evans Belloeil Jun 05 '14 at 07:01
  • What is your QT version 4\ 5? – Balu Jun 05 '14 at 07:01
  • you have to include like `#include ` – Balu Jun 05 '14 at 07:03

1 Answers1

1

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.

László Papp
  • 51,870
  • 39
  • 111
  • 135