Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-90561

some non-virtual methods of QWidget are redefined in subclasses

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12

    Description

      There is a design problem in Qt 5.12 (and probably in many other versions) with QWidget methods move(), resize() and setGeometry(). These methods are not virtual, and yet they are redefined at least in subclass QRubberBand, which is a subclass of QWidget.

      Redefining an inherited non-virtual method is a no-no - this is well explained for example by Scott Meyers, in Item 36 ("Never redefine an inherited non-virtual function") of his book "Effective C++" (3rd edition).

      (I was advised in https://forum.qt.io/topic/122982/serious-design-problem-in-qt-5-12 to report this problem here.)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            dave2 Dave Ohlsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes