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; } } }
private void changeStyle(boolean checked) { if (!checked) return; QAction action = (QAction) QSignalEmitter.signalSender(); QStyle style = QStyleFactory.create((String) action.data()); if (style != null) { QApplication.setStyle(style); QApplication.setPalette(style.standardPalette()); } setTextOnRadioButtons(); changeSize(true); }
private void save() { QAction action = (QAction) QSignalEmitter.signalSender(); QByteArray fileFormat = QVariant.toByteArray(action.data()); saveFile(new String(fileFormat.toByteArray())); }