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
dragwidget.h
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
4
#
ifndef
DRAGWIDGET_H
5
#
define
DRAGWIDGET_H
6
7
#
include
<
QByteArray
>
8
#
include
<
QFrame
>
9
#
include
<
QString
>
10
#
include
<
QStringList
>
11
12
class
QComboBox;
13
class
QFrame;
14
class
QLabel;
15
class
QTextBrowser;
16
17
class
DragWidget
:
public
QFrame
18
{
19
Q_OBJECT
20
21
public
:
22
explicit
DragWidget
(
QWidget
*
parent
=
nullptr
);
23
void
setData
(
const
QString &mimetype,
const
QByteArray &newData);
24
25
signals
:
26
void
dragResult
(
const
QString
&
actionText
);
27
void
mimeTypes
(
const
QStringList &types);
28
29
protected
:
30
void
dragEnterEvent
(QDragEnterEvent *event)
override
;
31
void
dropEvent
(QDropEvent *event)
override
;
32
void
mouseMoveEvent
(QMouseEvent *event)
override
;
33
void
mousePressEvent
(QMouseEvent *event)
override
;
34
35
private
:
36
QByteArray data;
37
QLabel *dragDropLabel;
38
QPoint dragStartPosition;
39
QString mimeType;
40
};
41
42
#
endif
DragWidget
Definition
dragwidget.h:18
DragWidget::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *event) override
[6]
Definition
dragwidget.cpp:77
DragWidget::setData
void setData(const QString &mimetype, const QByteArray &newData)
[8]
Definition
dragwidget.cpp:109
DragWidget::dropEvent
void dropEvent(QDropEvent *event) override
[0]
Definition
dragwidget.cpp:35
DragWidget::mimeTypes
void mimeTypes(const QStringList &types)
DragWidget::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event) override
[0]
Definition
dragwidget.cpp:28
DragWidget::mousePressEvent
void mousePressEvent(QMouseEvent *event) override
[5]
Definition
dragwidget.cpp:69
qtbase
src
gui
doc
snippets
draganddrop
dragwidget.h
Generated on Sun Sep 29 2024 00:39:01 for Qt by
1.12.0