6.5.3 clean

This commit is contained in:
kleuter
2023-11-01 18:02:52 +01:00
parent bbe896803b
commit 7018d9e6c8
2170 changed files with 57471 additions and 43550 deletions

View File

@ -0,0 +1,37 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(dials LANGUAGES CXX)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/dials")
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
qt_standard_project_setup()
qt_add_executable(dials
dials.ui
main.cpp
)
set_target_properties(dials PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
target_link_libraries(dials PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Widgets
)
install(TARGETS dials
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -0,0 +1,8 @@
QT += widgets
SOURCES += main.cpp
FORMS += dials.ui
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/touch/dials
INSTALLS += target

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dials</class>
<widget class="QWidget" name="Dials">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QDial" name="dial_1">
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDial" name="dial_2">
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QDial" name="dial_3">
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QDial" name="dial_4">
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QDial" name="dial_5">
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDial" name="dial_6">
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QDial" name="dial_7">
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QDial" name="dial_8">
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,14 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example touch/dials
\title Touch Dials Example
\ingroup touchinputexamples
\brief Shows how to apply touch to a set of standard Qt widgets.
The Touch Dials example shows how to apply touch to a set of
standard Qt widgets.
\image touch-dials-example.png
*/

View File

@ -0,0 +1,21 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QApplication>
#include <QWidget>
#include <QDial>
#include "ui_dials.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QWidget window;
Ui::Dials dialsUi;
dialsUi.setupUi(&window);
const QList<QAbstractSlider *> sliders = window.findChildren<QAbstractSlider *>();
for (QAbstractSlider *slider : sliders)
slider->setAttribute(Qt::WA_AcceptTouchEvents);
window.showMaximized();
return app.exec();
}