I read through the first few tutorials at the Qt website for qt 3.0x.

Right now I'm in the "i'll write something off the top of my head and keep trying to compile it, read error messages, and fix it until it works" stage. (since I know simply reading through tutorial after tutorial won't really enhance my understanding)

here is what I have so far (its supposed to have a text box which the user can reverse whatever he puts in, and a quit button):

Code:
#include <qapplication.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qvbox.h>

class textBox : public QVBox
{
  Q_OBJECT
  public:
  textBox(QWidget *parent = 0, const char *name = 0);

  public slots:
  void reverseText(QLineEdit &);
};

textBox::textBox(QWidget *parent, const char *name)
    : QVBox(parent, name)
{

  QLineEdit *line = new QLineEdit("Enter your text here",this, "text");
  line->setMaxLength(100);

  QPushButton *reverse = new QPushButton("Reverse", this, "reverse");
  QPushButton *quit = new QPushButton("Quit", this, "quit");
  

  connect(reverse,SIGNAL(clicked()), this, SLOT(reverseText(line)) );
  connect(quit,SIGNAL(clicked()), qApp, SLOT(quit()) );
}
  
void textBox::reverseText(QLineEdit &line)
{
  int x;
  int y;
  QString txt;
  QString temp;
  
  txt = line.text();
  
  for(x = 0; x<100; x++)
  {
    for(y = 100; y>0; y--)
    {
      temp[y] = txt[x];
    }
  }

  line.setText(temp);
  
}
  
  

int main(int argc, char **argv)
{
  QApplication a(argc, argv);

  textBox t;

  t.setGeometry(100,100,300,300);
  
  a.setMainWidget(&t);
  t.show();
  return a.exec();
}
I'm getting the following errors in KDevelop 2.1:

Code:
gmake all-recursive 
gmake[1]: Entering directory `/home/will/code/qtapp1' 
Making all in qtapp1 
gmake[2]: Entering directory `/home/will/code/qtapp1/qtapp1' 
/bin/sh ../libtool --mode=link --tag=CXX g++ -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -o qtapp1 -L/usr/X11R6/lib -L/usr/lib/qt3/lib qtapp1.o -lqt-mt -lpng -lz -lm -lXext -lX11 -lresolv -lSM -lICE -lpthread -lresolv 
g++ -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -o qtapp1 qtapp1.o -L/usr/X11R6/lib -L/usr/lib/qt3/lib -lqt-mt -lpng -lz -lm -lXext -lX11 -lresolv -lSM -lICE -lpthread -lresolv 
gmake[2]: Leaving directory `/home/will/code/qtapp1/qtapp1' 
qtapp1.o: In function `textBox::textBox[not-in-charge](QWidget*, char const*)': 
/home/will/code/qtapp1/qtapp1/qtapp1.cpp:36: undefined reference to `vtable for textBox' 
/home/will/code/qtapp1/qtapp1/qtapp1.cpp:36: undefined reference to `vtable for textBox' 
qtapp1.o: In function `textBox::textBox[in-charge](QWidget*, char const*)': 
/home/will/code/qtapp1/qtapp1/qtapp1.cpp:36: undefined reference to `vtable for textBox' 
/home/will/code/qtapp1/qtapp1/qtapp1.cpp:36: undefined reference to `vtable for textBox' 
qtapp1.o: In function `textBox::~textBox [in-charge]()': 
/home/will/code/qtapp1/qtapp1/qtapp1.cpp:36: undefined reference to `vtable for textBox' 
qtapp1.o:/home/will/code/qtapp1/qtapp1/qtapp1.cpp:36: more undefined references to `vtable for textBox' follow 
collect2: ld returned 1 exit status 
gmake[1]: Leaving directory `/home/will/code/qtapp1' 
gmake[2]: *** [qtapp1] Error 1 
gmake[1]: *** [all-recursive] Error 1 
gmake: *** [all-recursive-am] Error 2 
*** failed ***

What could be causing this? Would it have to do with moc-ing something? (which I'm not entirely sure how to do). I looked up vtables on google and didn't find anything of use..

Any help would be appreciated, as always!

P.S.- I'm not really concerned about the "reverse" slot actually working right now - I just want it to compile - I can work on getting it to work properly later!