UID:8689
我定义了一个class Video,由于其他的一些因素,我只能在main函数中Video *video=new Video;
现在我想在其他的函数中使用*video,我该怎么办?
谢谢大家帮帮我!
UID:534
UID:733
qt422,g++,windows 编译通过,只是涉及到编译,功能方面的问题没有测试,因为只想表达一个思路。
vedio.h
#include <QtGui/QWidget>
class VideoWgt : public QWidget
another.h
another.cpp
extern VideoWgt *dlg;
void Another::func()
main.cpp
#include <QtGui/QApplication>
VideoWgt *dlg;
int main(int argc, char *argv[])
dlg = new VideoWgt();
app.connect(&app,SIGNAL(lastWindowClosed()),&app,SLOT(quit()));
附件上传不了…………