rkflx added a comment.
Some thoughts, inconclusive though:
Another idea: Sometimes additional functionality for non-virtual functions is
provided by hooking into the changeEvent(). However, for our use case we won't
get such events from QLabel.
Things we might want to consider when going with aggregation instead of
inheritance regarding QLabel (which seems like the best solution so far):
- Are there APIs or legacy users which can only take QLabels? (How to check
without manually analyzing lxr search results?)
- Which functions of QLabel and QFrame should we reimplement? (What is used?
What semantics do not make sense? Also see TODO in autotest.)
Ideal solution: Add virtual in Qt itself or make it a signal. Should we try
and ask for Qt6? It has been done before:
I wonder if there is a general best practice solution for this issue in KF5,
e.g. when looking at the Qt4 → Qt5 BIC transition?
To: rkflx, #frameworks