From 1b29fb8933f0c6fa8b916537969851c539a2de57 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Apr 2008 11:12:21 +0000 Subject: [PATCH] From John Shue, build fix for QT 3.x --- examples/osgviewerQT/AdapterWidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/osgviewerQT/AdapterWidget.cpp b/examples/osgviewerQT/AdapterWidget.cpp index 3626853d0..a9d0648ea 100644 --- a/examples/osgviewerQT/AdapterWidget.cpp +++ b/examples/osgviewerQT/AdapterWidget.cpp @@ -81,7 +81,11 @@ AdapterWidget::AdapterWidget( QWidget * parent, const char * name, const QGLWidg #endif { _gw = new osgViewer::GraphicsWindowEmbedded(0,0,width(),height()); +#if USE_QT4 setFocusPolicy(Qt::ClickFocus); +#else + setFocusPolicy(QWidget::ClickFocus); +#endif } void AdapterWidget::resizeGL( int width, int height ) @@ -234,6 +238,7 @@ int mainAdapterWidget(QApplication& a, osg::ArgumentParser& arguments) } viewerWindow->show(); +#if USE_QT4 } else if (arguments.read("--mdi")) { std::cout<<"Using ViewetQT MDI version"<showMaximized(); subWindow->setWindowTitle("New Window"); mw->show(); - +#endif // USE_QT4 } else { ViewerQT* viewerWindow = new ViewerQT;