int main(int argc, char *argv[])
{
// Create application
QApplication* mainApp = new QApplication(argc, argv);
// Create an OgreWidget
CustomOgreWidget* mOgreWidget = new CustomOgreWidget(0, 0);
mOgreWidget->loadRenderSystemsFromPlugins();
// Create a MainWindow
QMainWindow* mainWin = new QMainWindow();
// Setup user interface for MainWindow
Ui::ApplicationClass ui;
ui.setupUi(mainWin);
// Show MainWindow and add OgreWidget
mainWin->showMaximized();
mainWin->setCentralWidget(mOgreWidget);
// Initialise Ogre
mOgreWidget->initialiseOgre();
// Setup Ogre parameters
Ogre::NameValuePairList ogreWindowParams;
ogreWindowParams["FSAA"] = "";
mOgreWidget->initialise(&ogreWindowParams);
QObject::connect(ui.actionSelect_Object, SIGNAL(triggered()), mOgreWidget, SLOT(SlotOpenProject()) );
// Run application loop
return mainApp->exec();
}
|