From c2751b1d664748cfbd05d2e397f95f2cc0bec13f Mon Sep 17 00:00:00 2001 From: Andre de la Rocha Date: Mon, 21 Aug 2017 13:23:48 +0200 Subject: Active Qt Examples: Brush up to C++ 11 Use nullptr, member initialization, new connect syntax, QStringLiteral, etc. Change-Id: Ia79473ca302216f91eec6a32f670cf606761ed0d Reviewed-by: Michael Winkelmann Reviewed-by: Friedemann Kleint --- examples/activeqt/opengl/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'examples/activeqt/opengl/main.cpp') diff --git a/examples/activeqt/opengl/main.cpp b/examples/activeqt/opengl/main.cpp index 1c8a79b..45a90e1 100644 --- a/examples/activeqt/opengl/main.cpp +++ b/examples/activeqt/opengl/main.cpp @@ -65,19 +65,20 @@ QAXFACTORY_END() The main program is here. */ -int main( int argc, char **argv ) +int main(int argc, char *argv[]) { - QApplication::setColorSpec( QApplication::CustomColor ); + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QApplication::setColorSpec(QApplication::CustomColor); QApplication a(argc,argv); if (QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL) { - qWarning( "This system does not support OpenGL. Exiting." ); + qWarning("This system does not support OpenGL. Exiting."); return -1; } - if ( !QAxFactory::isServer() ) { + if (!QAxFactory::isServer()) { GLObjectWindow w; - w.resize( 400, 350 ); + w.resize(400, 350); w.show(); return a.exec(); //! [1] //! [2] -- cgit v1.2.1