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

Wrong example of QQuickImageProvider

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P4: Low
    • 5.4.2
    • 5.2.0
    • Documentation
    • None
    • 01fab234c6b0c8b770a8567e8beb0f4f6f9bc4be

    Description

      Here is example: http://qt-project.org/doc/qt-5/qquickimageprovider.html#an-example

      QQmlEngine engine;
      engine->addImageProvider(QLatin1String("colors"), new ColorPixmapProvider);
      

      This code will not compile. And if we change '->' to '.' it still useless.

      I think better example is:

      QtQuick2ApplicationViewer viewer; // or other main class
      viewer.engine()->addImageProvider(QLatin1String("colors"), new ColorPixmapProvider);
      

      Attachments

        For Gerrit Dashboard: QTBUG-38456
        # Subject Branch Project Status CR V

        Activity

          People

            docteam Qt Documentation Team
            razrfalcon Evgeniy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes