Please Help me How to install QT on VC++ 2008
-
@
#ifndef QT_H
#define QT_H#include <QtGui/QMainWindow>
#include "ui_qt.h"class Qt : public QMainWindow
{
Q_OBJECTpublic:
Qt(QWidget *parent = 0, Qt::WFlags flags = 0);
~Qt();private:
Ui::QtClass ui;
};#endif // QT_H
@@#include "qt.h"
Qt::Qt(QWidget *parent, Qt::WFlags flags)
: QMainWindow(parent, flags)
{
ui.setupUi(this);
}Qt::~Qt()
{}
@@#include "qt.h"
#include <QtGui/QApplication>int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Qt w;
w.show();
return a.exec();
}
@ -
First, please be more patiently. We all do the support here in our spare time and as volunteers. If your topic has that much answers, someone will surely come back with an answer.
As others already have mentioned, do not name your class Qt! This will conflict with the Qt namespace in the Qt libs itself. Additionally, it's good practice to not prefix your own classes with Q or Qt, as this is informally reserved for Qt's own classes.
-
you can get it from http://qt.nokia.com/downloads/downloads#qt-lib
-
[quote author="cincirin" date="1323286429"]Try to rename your files. From what I see you have Qt.cpp and Qt.h in your project. And don't use only Qt in your namespaces or class definitions or other defined type.[/quote]
[quote author="Volker" date="1323301857"]As others already have mentioned, do not name your class Qt! This will conflict with the Qt namespace in the Qt libs itself. Additionally, it's good practice to not prefix your own classes with Q or Qt, as this is informally reserved for Qt's own classes.[/quote]
You have made these changes ? If yes, you still have errors ? If yes, please post new code with the changes.