diff options
author | Andy Shaw <andy.shaw@digia.com> | 2014-12-18 10:02:47 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@digia.com> | 2015-01-05 07:49:15 +0100 |
commit | f444b25ac1dfe240b5ae592717907b15d30a5c21 (patch) | |
tree | 227e1f674a38c7def07aa3284d5d522bbb449b04 /src/platformheaders/doc | |
parent | 84a3dacf462a4170a7fbc71b012fbb2db2c34a19 (diff) |
Add a platform function to enable setting the touch flags on Windows
This makes it possible for the flags that RegisterTouchWindow takes to be
specified after the window has been created.
Task-number: QTBUG-41433
Change-Id: I166143875ef54ab6a249cffb31d017845a694a01
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/platformheaders/doc')
-rw-r--r-- | src/platformheaders/doc/snippets/qwindowswindowfunctions/main.cpp | 61 | ||||
-rw-r--r-- | src/platformheaders/doc/src/qtplatformheaders.qdoc | 2 |
2 files changed, 62 insertions, 1 deletions
diff --git a/src/platformheaders/doc/snippets/qwindowswindowfunctions/main.cpp b/src/platformheaders/doc/snippets/qwindowswindowfunctions/main.cpp new file mode 100644 index 0000000000..c5f2f37f11 --- /dev/null +++ b/src/platformheaders/doc/snippets/qwindowswindowfunctions/main.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtWidgets> +#include <QtPlatformHeaders/qwindowswindowfunctions.h> + +//! [0] +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + + QPushButton topLevelWidget("Hello World!"); + topLevelWidget.winId(); //have to create the QWindow + + QWindow *tlwWindow = topLevelWidget.windowHandle(); + + QWindowsWindowFunctions::setTouchWindowTouchType(tlwWindow, QWindowsWindowFunctions::WantPalmTouch); + + topLevelWidget.show(); + + return app.exec(); +} +//! [0] + diff --git a/src/platformheaders/doc/src/qtplatformheaders.qdoc b/src/platformheaders/doc/src/qtplatformheaders.qdoc index 94059e5508..9df9f996bc 100644 --- a/src/platformheaders/doc/src/qtplatformheaders.qdoc +++ b/src/platformheaders/doc/src/qtplatformheaders.qdoc @@ -78,7 +78,7 @@ classes is only guaranteed to work with the Qt version it was developed against. Unlike QPA however, source compatibility is guaranteed. - \sa QXcbWindowFunctions + \sa QXcbWindowFunctions QWindowsWindowFunctions \section1 API Reference \list |