Results 1 to 1 of 1

Thread: QThread expected class name before { token

  1. #1
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    44
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: QThread expected class name before { token

    hi folks,
    i have got following code and i am having a little bit of problem

    header
    Qt Code:
    1. #include <QThread>
    2.  
    3. class Fthrclass: public Qthread
    4. {
    5. public:
    6. Fthrclass();
    7.  
    8. virtual void run();
    9. };
    To copy to clipboard, switch view to plain text mode 
    problem is if i get rid of "ublic QThread" and "virtual void run" it builds properly otherwise it gives me error "expected class name before { token"

    i have no idea whats happening here, as far as i can see syntax is correct

    i m using QT4.7.1 and qtcreator (g++ for compiler) on linux

    OH crap! i found error! it was QThread instead of Qthread in inheritance... thanx anyways guys, i specially registered to qtcentre.org to ask this question and found answer myself the very next time i looked at my code, lolz
    Last edited by wysota; 24th January 2011 at 12:45. Reason: missing [code] tags

Similar Threads

  1. Replies: 13
    Last Post: 19th May 2010, 06:34
  2. Expected class-name before '{' token
    By imagiro1 in forum Newbie
    Replies: 16
    Last Post: 16th June 2009, 12:37
  3. error: expected class-name before '{' token
    By Aresti in forum Qt Programming
    Replies: 1
    Last Post: 12th November 2008, 21:00
  4. Replies: 4
    Last Post: 22nd February 2008, 20:08
  5. Replies: 2
    Last Post: 30th January 2008, 21:06

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.