Results 1 to 11 of 11

Thread: compile error that i don't understand

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Grenoble, France
    Posts
    165
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    106

    Question compile error that i don't understand

    I have selected the lines relevant (sic) to the prolem:
    first archiv.h puis archiv.cpp

    Qt Code:
    1. class Archives : public QDialog
    2. {
    3. Q_OBJECT
    4.  
    5. public:
    6. Archives( QWidget *parent = 0 );
    7. ~Archives();
    8.  
    9. protected:
    10. QTreeView *qArchiv;
    11.  
    12. void addArchiv( QString sDate, QString sDest, QString sMsg );
    13. void remplirArchiv();
    14. void selmsg( const QModelIndex() &);
    15.  
    16. QPushButton *pbOk;
    17. };
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. //****************************************************************
    2. connect( qArchiv, SIGNAL( clicked( const QModelIndex() ) ),
    3. this, SLOT( selmsg( const QModelIndex() ) ) );
    4. }
    5.  
    6. void Archives::selmsg( const QModelIndex() idx )
    7. {
    8. accept();
    9. close();
    10. }
    To copy to clipboard, switch view to plain text mode 
    compile:
    7 C:\Qt\test\sms\archiv.cpp In file included from archiv.cpp
    24 C:\Qt\test\sms\archiv.h variable or field `selmsg' declared void
    24 C:\Qt\test\sms\archiv.h expected `;' before '(' token
    60 C:\Qt\test\sms\archiv.cpp variable or field `selmsg' declared void
    60 C:\Qt\test\sms\archiv.cpp `int Archives::selmsg' is not a static member of `class Archives'
    60 C:\Qt\test\sms\archiv.cpp expected primary-expression before "const"
    Last edited by incapacitant; 29th March 2006 at 12:13.

Similar Threads

  1. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  2. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02

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
  •  
Qt is a trademark of The Qt Company.