qt5base-lts/examples/widgets/painting
Alexandru Croitor 638ac41293 CMake: Fix painting examples to build as standalone projects
The examples use an intermediate object library to avoid duplicate
file compilation. The examples worked when built as part of Qt
because the shared directory was always added, and Qt::OpenGL is
available implicitly.

Change each project to add_subdirectory(../shared) if the object
library is not available, thus making the examples build as standalone
projects.

Call find_package inside the shared project, to ensure the Qt packages
are found.

Create an alias called 'painting_shared::painting_shared' and link
against that to ensure that any failure is caught at configure time
rather than build time.

Adapt the pathstroke example to use the object library.

Comment out the code for the OpenGL scopes, because it's handled
by the object library.

Make sure the OpenGL dependency is public.
Make sure to run moc and compile the OpenGL specific files as well.

Task-number: QTBUG-87444
Change-Id: Ib0ecb68948581c5267ca04f19d8043fa44ff3d54
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-27 19:26:45 +01:00
..
affine CMake: Fix painting examples to build as standalone projects 2020-10-27 19:26:45 +01:00
basicdrawing CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
composition CMake: Fix painting examples to build as standalone projects 2020-10-27 19:26:45 +01:00
concentriccircles CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
deform CMake: Fix painting examples to build as standalone projects 2020-10-27 19:26:45 +01:00
fontsampler CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
gradients CMake: Fix painting examples to build as standalone projects 2020-10-27 19:26:45 +01:00
imagecomposition CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
painterpaths CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
pathstroke CMake: Fix painting examples to build as standalone projects 2020-10-27 19:26:45 +01:00
shared CMake: Fix painting examples to build as standalone projects 2020-10-27 19:26:45 +01:00
transformations CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
.prev_CMakeLists.txt CMake: Regenerate examples/widgets/ projects 2020-04-29 22:48:38 +02:00
CMakeLists.txt CMake: Regenerate examples/widgets/ projects 2020-04-29 22:48:38 +02:00
painting.pro don't build shared demo library which is not used anyway 2013-01-31 15:51:09 +01:00
README Moving .qdoc files under examples/widgets/doc 2012-08-20 12:20:55 +02:00

Qt's painting system is able to render vector graphics, images, and outline
font-based text with sub-pixel accuracy accuracy using anti-aliasing to
improve rendering quality.

These examples show the most common techniques that are used when painting
with Qt, from basic concepts such as drawing simple primitives to the use of
transformations.


Documentation for these examples can be found via the Examples
link in the main Qt documentation.