HelloDan
15th May 2009, 17:45
I just test the an example of the C++ GUI programming with Qt4, the one to implement the media player. But fail, the following is some part the error information.
playerwindow.cpp:2:21: QAxWidget: No such file or directory
playerwindow.cpp: In constructor `PlayerWindow::PlayerWindow()':
playerwindow.cpp:8: error: invalid use of undefined type `struct QAxWidget'
playerwindow.h:6: error: forward declaration of `struct QAxWidget'
playerwindow.cpp:9: error: invalid use of undefined type `struct QAxWidget'
playerwindow.h:6: error: forward declaration of `struct QAxWidget'
playerwindow.cpp:10: error: invalid use of undefined type `struct QAxWidget'
playerwindow.h:6: error: forward declaration of `struct QAxWidget'
playerwindow.cpp:11: error: invalid use of undefined type `struct QAxWidget'
playerwindow.h:6: error: forward declaration of `struct QAxWidget'
playerwindow.cpp:13: error: no matching function for call to `PlayerWindow::conn
ect(QAxWidget*&, const char[27], PlayerWindow* const, const char[29])'
../4.4.3/include/QtCore/../../src/corelib/kernel/qobject.h:197: note: candidates
are: static bool QObject::connect(const QObject*, const char*, const QObject*,
const char*, Qt::ConnectionType)
../4.4.3/include/QtCore/../../src/corelib/kernel/qobject.h:303: note:
bool QObject::connect(const QObject*, const char*, const char*, Qt::Connec
tionType) const
playerwindow.cpp:15: error: no matching function for call to `PlayerWindow::conn
ect(QAxWidget*&, const char[39], PlayerWindow* const, const char[41])'
../4.4.3/include/QtCore/../../src/corelib/kernel/qobject.h:197: note: candidates
are: static bool QObject::connect(const QObject*, const char*, const QObject*,
const char*, Qt::ConnectionType)
../4.4.3/include/QtCore/../../src/corelib/kernel/qobject.h:303: note:
bool QObject::connect(const QObject*, const char*, const char*, Qt::Connec
tionType) const
playerwindow.cpp:17: error: no matching function for call to `PlayerWindow::conn
ect(QAxWidget*&, const char[32], PlayerWindow* const, const char[34])'
The pro file as follow:
TEMPLATE = app
CONFIG += qaxcontainer
HEADERS = playerwindow.h
SOURCES = main.cpp \
playerwindow.cpp
I don't know where comes the error. Can you help me to correct it? Thanks!!!!
playerwindow.cpp:2:21: QAxWidget: No such file or directory
playerwindow.cpp: In constructor `PlayerWindow::PlayerWindow()':
playerwindow.cpp:8: error: invalid use of undefined type `struct QAxWidget'
playerwindow.h:6: error: forward declaration of `struct QAxWidget'
playerwindow.cpp:9: error: invalid use of undefined type `struct QAxWidget'
playerwindow.h:6: error: forward declaration of `struct QAxWidget'
playerwindow.cpp:10: error: invalid use of undefined type `struct QAxWidget'
playerwindow.h:6: error: forward declaration of `struct QAxWidget'
playerwindow.cpp:11: error: invalid use of undefined type `struct QAxWidget'
playerwindow.h:6: error: forward declaration of `struct QAxWidget'
playerwindow.cpp:13: error: no matching function for call to `PlayerWindow::conn
ect(QAxWidget*&, const char[27], PlayerWindow* const, const char[29])'
../4.4.3/include/QtCore/../../src/corelib/kernel/qobject.h:197: note: candidates
are: static bool QObject::connect(const QObject*, const char*, const QObject*,
const char*, Qt::ConnectionType)
../4.4.3/include/QtCore/../../src/corelib/kernel/qobject.h:303: note:
bool QObject::connect(const QObject*, const char*, const char*, Qt::Connec
tionType) const
playerwindow.cpp:15: error: no matching function for call to `PlayerWindow::conn
ect(QAxWidget*&, const char[39], PlayerWindow* const, const char[41])'
../4.4.3/include/QtCore/../../src/corelib/kernel/qobject.h:197: note: candidates
are: static bool QObject::connect(const QObject*, const char*, const QObject*,
const char*, Qt::ConnectionType)
../4.4.3/include/QtCore/../../src/corelib/kernel/qobject.h:303: note:
bool QObject::connect(const QObject*, const char*, const char*, Qt::Connec
tionType) const
playerwindow.cpp:17: error: no matching function for call to `PlayerWindow::conn
ect(QAxWidget*&, const char[32], PlayerWindow* const, const char[34])'
The pro file as follow:
TEMPLATE = app
CONFIG += qaxcontainer
HEADERS = playerwindow.h
SOURCES = main.cpp \
playerwindow.cpp
I don't know where comes the error. Can you help me to correct it? Thanks!!!!