Fix build of the widgets doc snippets on Windows

- Fix warning about missing return from main()
- Turn it into a library to prevent link errors from missing main()
  (used by winmain()).

Amends a426326e99.

Pick-to: 5.15
Task-number: QTBUG-81497
Change-Id: Idbcb5c26538ee474bc80387d0a1dae3af7b53744
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
Friedemann Kleint 2020-05-06 07:56:46 +02:00
parent 5f5f010885
commit 2e1ef96cf8
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@
#include <QDrag>
#include <QGraphicsSceneMouseEvent>
int main()
void main()
{
//! [0]
QGraphicsScene scene;

View File

@ -1,7 +1,7 @@
requires(qtHaveModule(widgets))
requires(qtHaveModule(printsupport))
TEMPLATE = app
TEMPLATE = lib
TARGET = widgets_snippets