Am Samstag, 5. März 2016, 10:53:18 schrieb Thomas Lübking: > On Samstag, 5. März 2016 08:34:27 CEST, Frederik Schwarzer wrote:
Hi, > > Since in my use case, some of the values in the dialog are > > calculated and (to my understanding) cannot be handled correctly > > by Kcfg, I want> > > to get rif of the "Restore Defaults" button. So I add this line: > > dialog->setStandardButtons(QDialogButtonBox::Ok | > > > > QDialogButtonBox::Cancel | QDialogButtonBox::Help); > > > > but then the Help button does not open the Help browser anymore. > > > ::setStandardButtons simply forwards the call to the internal button > ::box which nukes all button objects (incl. their slot connections) > ::and recreates them w/ the new item list. Ok, reading it like this, the behaviour suddenly makes sense. :) > The most straight forward solution is likely to hide or delete > button(QDialogButtonBox::RestoreDefaults) I would like to try this but cannot find info on how to hide a standard button. The KDE 4 version did not have that button either so it's at least not worse than before. > Rather replace the restore defaults button, resp. re-link it to your > own calculation slot. I will add a comment that this is better and should be considered in the future. Thanks for the hints. Regards, Frederik