Active Qt Problem
-
"Documentation":http://qt-project.org/doc/qt-4.8/activeqt.html
And searching this site will offer a lot of good starting points! Using the keywords: 'ActiveQt' and/or 'excel' will offer enough examples / threads. Goodluck! -
[quote author="NL - Danny" date="1363953377"]"Documentation":http://qt-project.org/doc/qt-4.8/activeqt.html
And searching this site will offer a lot of good starting points! Using the keywords: 'ActiveQt' and/or 'excel' will offer enough examples / threads. Goodluck![/quote]I am looking. I hope I can understand.
-
Keep us posted!
-
I've find two topics for you. I think they should be help you.
http://qt-project.org/forums/viewthread/1871
http://www.qtcentre.org/threads/9088-ActiveQt-Excel -
How should we know where your problem is?
You do not even tell us what your problem is!If you want to, you can put all code in MainWindow.
If it is correct to do so, is another question. -
[quote author="NL - Danny" date="1363988058"]How should we know where your problem is?
You do not even tell us what your problem is!If you want to, you can put all code in MainWindow.
If it is correct to do so, is another question. [/quote]I guess You show the error when compile that code. I got errors below.
error: undefined reference to
QAxObject::QAxObject(QString const&, QObject*)' error: undefined reference to
QAxObject::QAxObject(QString const&, QObject*)'
error: collect2: ld returned 1 exit status -
Library can not be found.
I do not know QAxObject but there is a container activeqt, so maybe it should be added to the QT field in the pro file? Have you included the correct header? -
You definitely right. The problem occurs because of library.
I add the pro file the code which is below. The problem is solved.
@CONFIG += qaxcontainer@I can open, save, load Excel files now. There are a kind of functions which are strange with Qt. For example when I want to write B1 Cell to 5 (int);
@
...
QAxObject *range1 = worksheet->querySubObject("Range(B1)");
range1->setProperty("Value", QVariant(5));@setProperty() ,Property(), dynamicCall() functions belong Excel API? Should I learn that functions in MSDN?
-
No, the functions you mention belong to QObject / QAxBase.