Results 1 to 2 of 2

Thread: This line appears on the top of my new header file for a project

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    6
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default This line appears on the top of my new header file for a project

    æ¤£æ¹¦æ•¤â¦ä¥†ä‘Žä¥„ä± ää¡Ÿà¨æ£æ™¥æ¹©â¥ä¥ ä‘Žä¥„ä±ää¡Ÿà¨à¨æ £æ‘®æ™©â¼ â€¯ä¥†ä‘Žä¥ ä±ää¡Ÿà¨

    I don't know what that is, it just appeared on my newly created header file for a project. it has red line under it. when I hover my mouse over, it displayed expected a declaration.

    ਍
    also appared on my newly created cpp file that defines my header file.

    at first, I just simply delete these undefined rubish. however, I can't get my project to compile. It produced bunch of errors.

    stray '\377' in program
    stray '\376' in program
    stray '#' in program

    lots of null character ignored

    the following is my code for the header file

    Qt Code:
    1. #ifndef FindDialog_h
    2. #define FindDialog_h
    3.  
    4. #include <Qdialog>
    5.  
    6. class QCheckBox;
    7. class QLabel;
    8. class QLineEdit;
    9.  
    10. class FindDialog : public QDialog
    11. {
    12. Q_OBJECT
    13.  
    14. public:
    15. FindDialog(QWidget *parent = 0);
    16.  
    17. signals:
    18. void findNext(const QString &str, Qt::CaseSensitivity cs);
    19. void findPrevious(const QString &str, Qt::CaseSensitivity cs);
    20.  
    21. private slots:
    22. void findClicked();
    23. void enableFindButton(const QString &text);
    24.  
    25. private:
    26. QLabel *label;
    27. QLineEdit *lineEdit;
    28. QCheckBox *caseCheckBox;
    29. QCheckBox *backwardCheckBox;
    30. QPushButton *findButton;
    31. QPushButton *closeButton;
    32. };
    33.  
    34. #endif
    To copy to clipboard, switch view to plain text mode 

    I deleted the rubish at the begining

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: This line appears on the top of my new header file for a project

    It's
    Qt Code:
    1. #include <QDialog>
    To copy to clipboard, switch view to plain text mode 
    but that's probably just a typo. make sure you have deleted all the rubbish and that there is no invisible rest. Also make sure you set the right text encoding. Do you use Qt Creator?

Similar Threads

  1. Replies: 3
    Last Post: 3rd August 2010, 13:12
  2. Replies: 1
    Last Post: 1st June 2010, 08:05
  3. Replies: 1
    Last Post: 3rd December 2009, 23:34
  4. what is the use of header file apart from preventing recompilation
    By babu198649 in forum General Programming
    Replies: 1
    Last Post: 4th July 2008, 13:24
  5. Related to header file
    By merry in forum Qt Programming
    Replies: 2
    Last Post: 10th May 2007, 13:03

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.