• 3919阅读
  • 0回复

[提问]Qpicture编译失败????怎么情况啊。。。 [复制链接]

上一主题 下一主题
离线pengdekai
 

只看楼主 倒序阅读 楼主  发表于: 2011-03-21
我用的是qtopia2.2.0版本  
简单的程序以下显示
#include "MyLed.h"
#include <qpushbutton.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <qpicture.h>

MyLed::MyLed(QWidget* parent, const char* name, WFlags f)
:QWidget(parent)
{  
l1_on = new QPushButton("LED1_on", this);
l1_on->setGeometry(30,40,80,30);
QPicture   *pict;
pict = new QPicture;
}




QPushButton编译过去没问题,QPicture就死活不行,

MyLed.cpp: In constructor 'MyLed::MyLed(QWidget*, const char*, uint)':
MyLed.cpp:16: error: invalid use of incomplete type 'struct QPicture'
/opt/qtopia-free-2.2.0/qt2/include/qwindowdefs.h:78: error: forward declaration of 'struct QPicture'

然后我进/opt/qtopia-free-2.2.0/qt2/include/qwindowdefs.h 看了一下
有class QPicture;

所以请大侠帮忙一下~~



快速回复
限100 字节
 
上一个 下一个