summaryrefslogtreecommitdiff
path: root/examples/activeqt/opengl/main.cpp
diff options
context:
space:
mode:
authorAndre de la Rocha <andre.rocha@qt.io>2017-08-21 13:23:48 +0200
committerAndre de la Rocha <andre.rocha@qt.io>2017-08-23 11:01:43 +0000
commitc2751b1d664748cfbd05d2e397f95f2cc0bec13f (patch)
tree6a7a884caf28250927ee66f395e0634470ac0851 /examples/activeqt/opengl/main.cpp
parentb3e88744f36144db7cda0b85c161cdb10026eb65 (diff)
downloadqtactiveqt-c2751b1d664748cfbd05d2e397f95f2cc0bec13f.tar.gz
Active Qt Examples: Brush up to C++ 11
Use nullptr, member initialization, new connect syntax, QStringLiteral, etc. Change-Id: Ia79473ca302216f91eec6a32f670cf606761ed0d Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/activeqt/opengl/main.cpp')
-rw-r--r--examples/activeqt/opengl/main.cpp11
1 files changed, 6 insertions, 5 deletions
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]