[PATCH] Add debug output about style

Wald Commits scm-commit at wald.intevation.org
Fri Jun 27 11:35:25 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1403861722 -7200
# Node ID 376978e9cc61c532c259572934711383f1bc8188
# Parent  d4766b4922c9c5ac229448f203350ea3d5096aad
Add debug output about style

diff -r d4766b4922c9 -r 376978e9cc61 ui/main.cpp
--- a/ui/main.cpp	Fri Jun 27 11:01:14 2014 +0200
+++ b/ui/main.cpp	Fri Jun 27 11:35:22 2014 +0200
@@ -18,6 +18,8 @@
 #include <QDebug>
 #include <QTranslator>
 
+#include <QStyleFactory>
+
 #ifndef VERSION
 #define VERSION "0.0.1"
 #endif
@@ -54,6 +56,9 @@
     QApplication::setApplicationVersion(QString::fromLatin1(VERSION));
     QSettings::setDefaultFormat(QSettings::IniFormat);
 
+    qDebug() << "Application style is: " << app.style()->metaObject()->className();
+    qDebug() << "Available styles: " << QStyleFactory::keys().join(", ");
+
     QStringList arguments = QApplication::arguments();
     bool trayMode = arguments.contains("--tray");
 


More information about the Trustbridge-commits mailing list