Qt documentation "List of all members..." omits certain method(s)
-
I have come a cropper on a certain inherited method "disappearing" at some point when I use doc pages' List of all members, including inherited members link. I do not know whether this is an isolated incident or points to a more widespread problem.
Take the void QWidget::update() Public Slots method.
-
If you go to QAbstractScrollArea Class and click its List of all members, including inherited members link, https://doc.qt.io/qt-5/qabstractscrollarea-members.html does still show inherited update() method (in the "early" part of the list, where it puts e.g. slots before other members). This is fine and correct.
-
But if you go up to QAbstractItemView Class and click its List of all members, including inherited members link, https://doc.qt.io/qt-5/qabstractitemview-members.html, the
update()
slot inherited fromQAbstractScrollArea
/QWidget
is completely missing/absent. So forQAbstractItemView
and anything inheriting from it I no longer know there is still anupdate()
method; this caused me much grief/head-scratching till I discovered it was just missing. :(
The reason may be:
QAbstractItemView
has its own void QAbstractItemView::update(const QModelIndex &index) Public Slots method. However, this does not hide/override the baseQWidget::update()
method, as it takes different parameters.I don't know whether the Qt docs' List of all members, including inherited members link page is generated "automatically" by inspection of base class members or whether it is maintained manually by someone. I would have thought the former but perhaps that is not available and it is the latter. So I don't know whether this is a one-off case for just that
update()
method or a more general problem with other inherited methods/slots/whatever.BTW, this
update()
"missing method in list" is still present in corresponding Qt6 docs pages. -
-
Have you read the
Note
underDetails
? :)If you inherit QAbstractItemView and intend to update the contents of the viewport,
you should useviewport->update()
instead ofQWidget::update()
as all painting operations take place on the
viewport.( https://doc.qt.io/qt-5/qabstractitemview.html#details)
Dont know, if they left out
QWidget::update()
intentionally because you probably dont want to use it or if they forgot to put it on that list of inherited members. -
@Pl45m4 said in Qt documentation "List of all members..." omits certain method(s):
because you probably dont want to use it or if they forgot to put it on that list of inherited members.
I deffo want to use it because that's why I was looking for it! It's not their job to "decide for me" whether to include a member because they "don't think I will want it"! :)
Originally I assumed the inherited members list is generated automatically for them, and there is a fault in whatever does that. Maybe you are right and they actually maintain this list by hand!
-
The list is auto-generated, and that QWidget::update() is missing looks like a bug. Created https://bugreports.qt.io/browse/QTBUG-102342 to track this. Thanks for notifying!