my 2 cents, what I do is I make a basic QObject singleton, which provide signal, anything can hook to the signal and everybody can easily fire the signal.
QObjectSingleton::showHelpDialog() could be send from anywhere by any code and I can then make my Widget change it's visibility based on this signal connection. This avoid the need to have the widget into a singleton for my use cases. Not sure this is doable for your use case but might help to have a cleaner design. On Wed, 29 Aug 2018 at 14:25, Christopher Probst <christop.pro...@gmail.com> wrote: > Hello Everybody, > > Along the same lines of a question I have asked in the past, as a rule of > thumb I never have a singleton hold a QWidget/QDialog from the instance of > a singleton. However I am not sure why I follow this basic principle. Does > anybody object to having the instance of a singleton be a QWidget or a > QDialog and why? I thank you in advance. > > Thanks, > Christopher > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest