C++

Qt

collect: ld returned 1 exit status 问题

 collect: ld returned 1 exit status
问题:如果有自定义的类,类中定义了构造函数,和析构函数时,请注意析构函数声明了,记得定义,如果不想麻烦,在定义时可以:
1
 #ifndef MYCONFIG_H
 2 #define MYCONFIG_H
 3 
 4 
 5 #include <QtGui/QWidget>
 6 #include <QLabel>
 7 #include <QLineEdit>
 8 
 9 
10 class MyPage1 : public QWidget
11 {
12     Q_OBJECT
13 
14 public:
15     MyPage1(QWidget *parent = 0);
16     ~MyPage1(){};
17     QLabel *NameLabel,*HeightLabel,*NumLabel,*QuotationLabel;
18     QLineEdit *NameEdit,*HeightEdit,*NumEdit,*QuotationEdit;
19 };
20 
21 class MyPage2 : public QWidget
22 {
23     Q_OBJECT
24 
25 public:
26     MyPage2(QWidget *parent = 0);
27     ~MyPage2(){};
28 
29 };
30 class MyPage3 : public QWidget
31 {
32     Q_OBJECT
33 
34 public:
35     MyPage3(QWidget *parent = 0);
36     ~MyPage3(){};
37 
38 };
39 #endif // MYCONFIG_H

posted on 2012-03-17 16:39 xiaoxinhe1989 阅读(467) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


My Links

Blog Stats

常用链接

留言簿

随笔档案

新闻档案

搜索

最新评论

阅读排行榜

评论排行榜