private void checkCurrentStyle() { for (QAction action : styleActionGroup.actions()) { String styleName = action.data().toString(); QStyle candidate = QStyleFactory.create(styleName); if (candidate.objectName().equals(QApplication.style().objectName())) { action.trigger(); return; } } }