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

Use an object's operator<<(QDebug) when passed to print()/console.log()

    XMLWordPrintable

Details

    Description

      Currently, printing an object will result in output like this:

      MyObject(0x60700026e920, "myObjectName")
      

      It would be nice if the object's operator<<(QDebug) would be used instead (or just call QDebug::toString(object)). That way we could get useful debug information about a n object without having to define an invokable member function.

      See also: https://lists.qt-project.org/pipermail/development/2015-November/023713.html

      Attachments

        Issue Links

          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
              mitch_curtis Mitch Curtis
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes