Results 1 to 14 of 14

Thread: error: ISO C++ forbids declaration of ‘mainScreenDLG’ with no type

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Jul 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: error: ISO C++ forbids declaration of ‘mainScreenDLG’ with no type

    the object name is "mainScreenDLG" in the file mainScreen.ui (created in Qt Designer)
    i think that it hadnt recognised the mainScreen.ui file until i re-opened it in Designer for some reason. that or i had misnamed it and
    but im still getting the "13: error: expected class-name before ‘{’ token"

    on a related note, the code from my "mainScreen.cpp" file is experiencing errors

    Qt Code:
    1. #include <QApplication>
    2. #include <QDataStream>
    3. #include <QtGui>
    4. #include <cstdlib>
    5. #include <ctime>
    6. #include "ui_mainScreen.h"
    7. #include "mainScreen.h"
    8.  
    9. bool selectSum, selectSub, selectMulti, selectDivisi;
    10.  
    11. // code to begin the programme
    12. mainScreen::mainScreen(QDialog *parent)
    13.  
    14. {
    15. setupUi(this);
    16.  
    17. // connect the buttons and labels to the code
    18. connect (btnCheck, SIGNAL( clicked() ), this, SLOT( getPath() ) );
    19.  
    20. };
    To copy to clipboard, switch view to plain text mode 

    18: error: no matching function for call to ‘mainScreen::connect(<unresolved overloaded function type>, const char*, mainScreen* const, const char*)’

    thankyou for everyone in their help!

    EDIT: the new error was because i had tried to link by button to a function that did not exist (getPath)
    Last edited by Baxter; 27th July 2010 at 12:19.

Similar Threads

  1. Replies: 12
    Last Post: 29th April 2010, 13:22
  2. Error::defined after prior declaration as dllimport:
    By hasnatzaidi in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2009, 01:37
  3. error: forward declaration of 'struct QPushButton'
    By prykHetQuo in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2009, 23:20
  4. forbids declaration of QHash with no type
    By nina1983 in forum Qt Programming
    Replies: 4
    Last Post: 16th July 2008, 13:05
  5. Forward Class declaration ERROR
    By nleverin in forum Qt Programming
    Replies: 1
    Last Post: 30th July 2007, 08:35

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.