Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_gui_kernel_qapplication.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
#
include
<
QApplication
>
4
#
include
<
QStyleFactory
>
5
#
include
<
QWidget
>
6
7
8
namespace
src_gui_kernel_qapplication
{
9
struct
MyWidget
10
{
11
QSize
sizeHint
()
const
;
12
13
int
foo
= 0;
14
MyWidget
operator
- (
MyWidget
& other)
15
{
16
MyWidget
tmp = other;
17
return
tmp;
18
};
19
int
manhattanLength
() {
return
0; }
20
};
21
22
void
startTheDrag
() {};
23
void
wrapper1
() {
24
MyWidget
startPos;
25
MyWidget
currentPos;
26
int
x = 0;
27
int
y = 0;
28
29
//! [6]
30
if
((startPos - currentPos).manhattanLength() >=
31
QApplication::startDragDistance())
32
startTheDrag
(
)
;
33
//! [6]
34
35
}
// wrapper1
36
37
}
// src_gui_kernel_qapplication
src_gui_kernel_qapplication
Definition
src_gui_kernel_qapplication.cpp:8
src_gui_kernel_qapplication::startTheDrag
void startTheDrag()
Definition
src_gui_kernel_qapplication.cpp:22
src_gui_kernel_qapplication::wrapper1
void wrapper1()
Definition
src_gui_kernel_qapplication.cpp:23
src_gui_kernel_qapplication::MyWidget
Definition
src_gui_kernel_qapplication.cpp:10
src_gui_kernel_qapplication::MyWidget::foo
int foo
Definition
src_gui_kernel_qapplication.cpp:13
src_gui_kernel_qapplication::MyWidget::manhattanLength
int manhattanLength()
Definition
src_gui_kernel_qapplication.cpp:19
src_gui_kernel_qapplication::MyWidget::operator-
MyWidget operator-(MyWidget &other)
Definition
src_gui_kernel_qapplication.cpp:14
src_gui_kernel_qapplication::MyWidget::sizeHint
QSize sizeHint() const
qtbase
src
gui
doc
snippets
code
src_gui_kernel_qapplication.cpp
Generated on
for Qt by
1.14.0