Doc: Show the includes needed for the QQuickView::rootObject() example


The page about interacting with QML objects from C++ shows
`QObject *object = view.rootObject();` in its QQuickView example.
rootObject() returns a QQuickItem pointer, and <QQuickView> only
forward-declares QQuickItem, so code that includes just <QQuickView>
fails to compile with an error about converting `QQuickItem *` to
`QObject *`. The snippet file compiled only because it included the
whole QtQuick module, which the page doesn't show.

Include <QQuickView> and <QQuickItem> explicitly in the snippet file,
and show those includes next to the QQuickView example.

Fixes: QTBUG-44198
Pick-to: 6.12
Change-Id: Iafbdb6d96d2d8fcacac31d524ab74356dbe3b4b5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
commit90abff0344146aae95a44f48c078db74c941f37a
parent681a3901d1987d4cbff8575eb29911e52426f6aa
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeTue, 13 Oct 2026 02:55:43 +0000