Results 1 to 6 of 6

Thread: ui not declared in scope

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question ui not declared in scope

    HEADER FILE
    Qt Code:
    1. #include <QMainWindow>
    2. #include "ui_form.h"
    3.  
    4. class Form1:public QMainWindow
    5. {
    6. Q_OBJECT
    7. public:
    8. Form1();
    9. ~Form1();
    10.  
    11. protected slots:
    12. void function1();
    13. }
    To copy to clipboard, switch view to plain text mode 

    CPP FILE
    Qt Code:
    1. #include "form1.h"
    2. #include <QDebug>
    3. #include <QFile>
    4. #include <QTextStream>
    5. #include <QTimer>
    6. #include <QDialog>
    7. #include <QMessageBox>
    8. #include <QStringListModel>
    9.  
    10. Form1::Form1():QMainWindow(NULL,0)
    11. {
    12. connect(ui.action_button, SIGNAL(clicked()), this, SLOT(function1()));
    13. }
    14.  
    15. void Form1::function1()
    16. {
    17. }
    18.  
    19. Form1::~Form1()
    20. {
    21. }
    To copy to clipboard, switch view to plain text mode 

    Error is on line 12 in the CPP file.
    Last edited by steve.bush; 18th March 2011 at 23:02.

Similar Threads

  1. GetFileSizeEx was not declared in this scope
    By Threepwood in forum Qt Programming
    Replies: 2
    Last Post: 8th February 2011, 12:03
  2. `lineEdit' was not declared in this scope?
    By i4ba1 in forum Qt Programming
    Replies: 2
    Last Post: 18th November 2009, 14:36
  3. QDomDocument was not declared in this scope
    By grantbj74 in forum Newbie
    Replies: 5
    Last Post: 25th August 2009, 09:43
  4. glutSolidSphere was not declared in this scope error
    By nuts_fever_007 in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2009, 04:56
  5. Replies: 2
    Last Post: 28th December 2007, 18:30

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.