I would like to use a strike out font for the text of a QRadioButton on a dialog.
On top off being enabled / disabled the strike out tells there is no selection at all.
Got this far:
Code: Select all
The Dialog and Widgets and the flag 'hasSelection'
var dialog = WidgetFactory.createDialog(Tile2Hatch.includeBasePath, "Tile2HatchDialog.ui");
var widgets = getWidgets(dialog);
var hasSelection = true; // or false
// The radio button:
widgets["RunT2HExport"].setEnabled(hasSelection);
// None of these alter the font and do not throw an error:
widgets["RunT2HExport"].setStrikeOut = true;
widgets["RunT2HExport"].setStrikeOut = false; // In case it was set in the UI
widgets["RunT2HExport"].font.setStrikeOut(true);
widgets["RunT2HExport"].font.setStrikeOut = true;
widgets["RunT2HExport"].font.setStrikeOut(false); // In case it was set in the UI
widgets["RunT2HExport"].font.setStrikeOut = false; // In case it was set in the UI
widgets["RunT2HExport"].font.setStrikeOut(hasSelection);
// Without the .font. and with arguments it throws an error.
// widgets["RunT2HExport"].setStrikeOut(true);
// Other trials fail too
Thanks,
CVH