示例#1
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MyGLWidget w;
    w.show();
    
    return a.exec();
}
示例#2
0
文件: main.cpp 项目: hkutangyu/QTDemo
int main(int argc, char **argv)
{
	Q_INIT_RESOURCE(texture);

	QApplication app(argc, argv);
	QTextCodec::setCodecForTr(QTextCodec::codecForLocale());
	MyGLWidget myglWidget;
	myglWidget.show();
	return app.exec();
}
void MainWindow::on_action3D_triggered()
{
    QString dataDir;
    dataDir = QFileDialog::getExistingDirectory(
                this,
                tr("Open Directory"),
                "/",
                QFileDialog::ShowDirsOnly|QFileDialog::DontResolveSymlinks
                );

    QDir dir(dataDir);
    QFileInfoList infoList = dir.entryInfoList(QDir::Files|QDir::NoDotAndDotDot);

    if (infoList.size() > 0 &&
            infoList[0].absoluteFilePath().right(4) == "pmpl") {
        MyGLWidget *w = new MyGLWidget(dataDir);
        w->get3DDataParam(infoList);        //这句之后w->data3D赋值完毕
        w->resize(1000,800);
        w->setWindowTitle("3D扫描图");
        w->show();
    }
}