Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, March 2007
The most annoying error


Message 1 in thread

Hi all,
Sorry to bother everyone twice in one day, but I am trying to compile a 
simple dialog and I keep getting the error message: expected class-name 
before '{' token.
The code can be found below
#ifndef NEWMEMBER_H
#define NEWMEMBER_H

#include <QDialog>

#include "ui_newmember.h"


class NewMember : public QDialog, public Ui::NewMember

{
  Q_OBJECT



public:
    NewMember(QWidget *parent = 0);

private slots:
    void on_lineEdit_textChanged();
};


#endif


Any help with this would be much appreciated

_________________________________________________________________
Exclusive Ed Byrne daily comedy clips on MSN Video 
http://specials.uk.msn.com/edbyrne/

--
 [ signature omitted ] 

Message 2 in thread

Hi,

don't need
public Ui::NewMember

use this if you want to public definiton:
class NewMember : public QDialog, Ui::NewMember

or some mistake is in ui_newmember.h file. Did you put FORMS += 
newmember.ui to pro file?

Bye!
dj


> Hi all,
> Sorry to bother everyone twice in one day, but I am trying to compile 
> a simple dialog and I keep getting the error message: expected 
> class-name before '{' token.
> The code can be found below
> #ifndef NEWMEMBER_H
> #define NEWMEMBER_H
>
> #include <QDialog>
>
> #include "ui_newmember.h"
>
>
> class NewMember : public QDialog, public Ui::NewMember
>
> {
>  Q_OBJECT
>
>
>
> public:
>    NewMember(QWidget *parent = 0);
>
> private slots:
>    void on_lineEdit_textChanged();
> };
>
>
> #endif
>
>
> Any help with this would be much appreciated
>
> _________________________________________________________________
> Exclusive Ed Byrne daily comedy clips on MSN Video 
> http://specials.uk.msn.com/edbyrne/
>
> -- 
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>

--
 [ signature omitted ] 

Message 3 in thread

On 03.03.07 18:24:45, Marco Gallone wrote:
> Hi all,
> Sorry to bother everyone twice in one day, but I am trying to compile a simple 
> dialog and I keep getting the error message: expected class-name before '{' 
> token.
> The code can be found below
> #ifndef NEWMEMBER_H
> #define NEWMEMBER_H
> 
> #include <QDialog>
> 
> #include "ui_newmember.h"
> 
> 
> class NewMember : public QDialog, public Ui::NewMember

Make sure you used NewMember as name for the dialog in the designer. The
classname of the generated class will be the same as the objectname of
your created form.

Andreas

-- 
 [ signature omitted ]