Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Need some help making a C++ Twitter client with QT (http://www.go4expert.com/forums/help-cpp-twitter-client-qt-t19780/)

CircuitX 16Oct2009 19:53

Need some help making a C++ Twitter client with QT
 
Hey everyone.

I'm trying to make a twitter client (called qTwit) in C++ with QT, but i'm a total beginner when it comed to making GUI applications, so I need a bit of help.

I have completed most of the GUI now, but I am getting a few compiler errors. (I am running Arch Linux, and my compiler is g++)

ERRORS:
Code:

bash-4.0$ make
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o qtwit.o qtwit.cpp
qtwit.cpp: In constructor ‘qTwit::qTwit(QWidget*)’:
qtwit.cpp:6: error: no matching function for call to ‘qTwit::setupUi(qTwit* const)’
ui_qtwit.h:41: note: candidates are: void Ui_qTwit::setupUi(QMainWindow*)
qtwit.cpp: At global scope:
qtwit.cpp:4: warning: unused parameter ‘parent’
make: *** [qtwit.o] Error 1

SOURCE
main.cpp:
Code:

#include <QApplication>
#include "qtwit.h"
 
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    qTwit *dialog = new qTwit;
 
    dialog->show();
    return app.exec();
}

qtwit.cpp:
Code:

#include <QtGui>
#include "qtwit.h"

qTwit::qTwit(QWidget *parent)
{
    setupUi(this);
 
    connect( pushButton_update, SIGNAL( clicked() ), this, SLOT( getStatus() ) );
    connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
}
 
 
void qTwit::getStatus()
{
    QString status;
    QString user;
    QString pass;
 
    status_edit->setText( status );
    user_edit->setText( user );
    pass_edit->setText( pass );

}

void qTwit::cancel()
{
    status_edit->clear();
}

qtwit.h:
Code:

#ifndef QTWIT_H
#define QTWIT_H
 
#include "ui_qtwit.h"
 
 
class qTwit : public QWidget, private Ui::qTwit
{
    Q_OBJECT
 
public:
    qTwit(QWidget *parent = 0);
 
 
public slots:
    void getStatus();
    void cancel();
};
 
 
#endif

ui_qtwit.h:
http://pastebin.com/f7a7d197c

Anyway, I have gotten rid of a few errors, but the ones that remain I am really stuck on!

If I have left any important information out, please ask me and I will add it.

Thanks,
Ben


All times are GMT +5.5. The time now is 17:51.