qvfb是Qt Virtual FrameBuffer的缩写,是QT在X11下的一个framebuffer仿真器,qte的应用程序就可以显示在qvfb上,qvfb提供了键盘和鼠标支持,这样开发人员就不需要将qte应用程序移到目标板上去运行和调试,大大地提升了工作效率。
Build QT tool qvfb
cd ~/Workshop
tar xvf qt-everywhere-opensource-src-4.7.1.tar.gz
mv qt-everywhere-opensource-src-4.7.1 qt-x11
./configure -debug -qvfb -confirm-license -nomake docs -developer-build -opensource -prefix /usr/local/Trolltech/Qt-X11
make
cd tools/qvfb
make
cd ../../
sudo make install
Build QTE for qvfb
cd ~/Workshop
tar xvf qt-everywhere-opensource-src-4.7.1.tar.gz
mv qt-everywhere-opensource-src-4.7.1 qt-embedded
./configure -debug -qvfb -qt-gfx-qvfb -qt-kbd-qvfb -qt-mouse-qvfb -embedded -confirm-license -nomake docs -developer-build -opensource -prefix /usr/local/Trolltech/Qt-embedded
make
sudo make install
Have a test
用QT自带的例子测试:
cd ~/Workshop/qt-x11/bin
./qvfb &
cd ~/Workshop/qt-embedded/demos/gradients
./gradients -qws -qvfb
自己写个简单例子测试:
/*test.cpp*/
#include
#include
#include
int main(int argc, char * argv[])
{
QApplication app(argc,argv);
QWidget* pWidget = new QWidget;
QLabel label(pWidget);
label.setText(QObject::tr("One World,One Dream!"));
pWidget->show();
return app.exec();
}
/usr/local/Trolltech/bin/qmake -project
/usr/local/Trolltech/bin/qmake
make
./test -qws -qvfb
阅读(3131) | 评论(0) | 转发(0) |