diff --git a/examples/widgets/doc/src/graphicsview-flowlayout.qdoc b/examples/widgets/doc/src/graphicsview-flowlayout.qdoc index e5080c672d4..13819f5499a 100644 --- a/examples/widgets/doc/src/graphicsview-flowlayout.qdoc +++ b/examples/widgets/doc/src/graphicsview-flowlayout.qdoc @@ -36,5 +36,17 @@ \image graphicsflowlayout-example.png - See the \l{Flow Layout Example} for a corresponding widget-based example. + This example uses a Graphics View to display the widget, which is a more + customizable approach than displaying the flow layout in the application + window (See \l {Flow Layout Example}). + + Graphics View Flow Layout snippet: + + \snippet graphicsview/flowlayout/main.cpp 1 + + Flow Layout Example snippet: + + \snippet layouts/flowlayout/main.cpp 1 + + */ diff --git a/examples/widgets/graphicsview/flowlayout/main.cpp b/examples/widgets/graphicsview/flowlayout/main.cpp index 850302e175b..74c03b9bce3 100644 --- a/examples/widgets/graphicsview/flowlayout/main.cpp +++ b/examples/widgets/graphicsview/flowlayout/main.cpp @@ -47,7 +47,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - +//! [1] #include "window.h" #include @@ -68,3 +68,4 @@ int main(int argc, char *argv[]) return app.exec(); } +//! [1] diff --git a/examples/widgets/layouts/flowlayout/main.cpp b/examples/widgets/layouts/flowlayout/main.cpp index 99725195e5f..bbc78ccda3c 100644 --- a/examples/widgets/layouts/flowlayout/main.cpp +++ b/examples/widgets/layouts/flowlayout/main.cpp @@ -47,7 +47,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - +//! [1] #include #include "window.h" @@ -59,3 +59,4 @@ int main(int argc, char *argv[]) window.show(); return app.exec(); } +//! [1] diff --git a/src/widgets/doc/images/graphicsflowlayout.png b/src/widgets/doc/images/graphicsflowlayout.png new file mode 100644 index 00000000000..ea70e102c3d Binary files /dev/null and b/src/widgets/doc/images/graphicsflowlayout.png differ