diff options
author | Michal Klocek <michal.klocek@qt.io> | 2023-03-20 08:46:13 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-22 12:48:47 +0000 |
commit | b71403faeedf2955e3af541f9e140305af9ba0a8 (patch) | |
tree | 5c3537c500c5c65dc473c9fd3e2d45b327fdcd95 /tests/manual/examples/quick/customdialogs/server.h | |
parent | 7d9805df3a471e7172bf72ff1bc08c63ccfd67fa (diff) | |
download | qtwebengine-b71403faeedf2955e3af541f9e140305af9ba0a8.tar.gz |
Move custom dialogs example to manual tests
This example shows how to use dialogs, however documentation
already provides snippets for that added in 3cbe59e29a.
The only missing one was tooltip, therefore add missing snippet
and move example to manual tests.
Task-number: QTBUG-108751
Change-Id: I84eda805455fb0276046ed1089389d605a8af672
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit 6bf30525ee49d270dae6a6440bc607513f21237c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/manual/examples/quick/customdialogs/server.h')
-rw-r--r-- | tests/manual/examples/quick/customdialogs/server.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/manual/examples/quick/customdialogs/server.h b/tests/manual/examples/quick/customdialogs/server.h new file mode 100644 index 000000000..563465013 --- /dev/null +++ b/tests/manual/examples/quick/customdialogs/server.h @@ -0,0 +1,29 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#ifndef SERVER_H +#define SERVER_H + +#include <QObject> +#include <QTcpServer> + +class Server : public QObject +{ + Q_OBJECT + +public: + explicit Server(QObject *parent = nullptr); + +public slots: + void run(); + +private slots: + void handleNewConnection(); + void handleReadReady(); + +private: + QTcpServer m_server; + QByteArray m_data; +}; + +#endif // SERVER_H |