Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.4, 6.0
-
None
Description
https://doc.qt.io/qt-5/qtabwidget.html#indexOf
Should take a const QWidget* or const QWidget& to allow this method to be used from const methods
Consider this example:
class Edit : QPlainTextEdit { Q_OBJECT public: Edit(const QTabWidget& parent) : _parent{parent} {} // would like to do: // int myIndex() const { return _parent.indexOf(this)}; // have to do: int myIndex() const { return _parent.indexOf(const_cast<Edit*>(this));}; private: const QTabWidget& _parent; };
Attachments
For Gerrit Dashboard: QTBUG-85833 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
309708,3 | Widgets: make indexOf take const QWidget * | dev | qt/qtbase | Status: MERGED | +2 | 0 |