|
linux下qt环境,代码如下:
/********************************/
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
osg::Node* earthNode = osgDB::readNodeFile("/gdal_tiff.earth");
if (!earthNode)
{
std::cout<< "Unable to load earth model." <<std::endl;
return 0;
}
osg::Group* root = new osg::Group();
root->addChild(earthNode);
osgEarth:tGui::ViewerWidget* viewerWindow = new osgEarth::QtGui::ViewerWidget(root);
viewerWindow->setCameraManipulator(new osgEarth::Util::EarthManipulator);
QMainWindow* mw = new QMainWindow();
QMdiArea* mdiArea = new QMdiArea(mw);
mw->setCentralWidget(mdiArea);
QMdiSubWindow *subWindow = mdiArea->addSubWindow(viewerWindow);
subWindow->resize(600, 400);
subWindow->show();
subWindow->setWindowTitle("New Window");
mw->showMaximized();
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
return a.exec();
}
/********************************/
拖动子窗口的边界,改变其大小,一动就崩溃,请问各位老师是什么原因?
程序崩溃时,控制台输出为:
/********************************/
xcb_io.c: 176: process_response: 断言"!(req && current_request && !(((long) (req->sequence) - (long) (current_request)) <= 0)"失败
/********************************/ |
|