Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
model.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
MODEL_H
5
#
define
MODEL_H
6
7
#
include
<
QObject
>
8
#
include
<
QStringListModel
>
9
10
class
DragDropListModel :
public
QStringListModel
11
{
12
Q_OBJECT
13
14
public
:
15
DragDropListModel(
const
QStringList &strings, QObject *parent =
nullptr
);
16
17
Qt::ItemFlags flags(
const
QModelIndex &index)
const
override;
18
19
bool
canDropMimeData(
const
QMimeData *data, Qt::DropAction action,
20
int
row,
int
column,
const
QModelIndex &parent)
const
override;
21
bool
dropMimeData(
const
QMimeData *data, Qt::DropAction action,
22
int
row,
int
column,
const
QModelIndex &parent) override;
23
QMimeData *mimeData(
const
QModelIndexList &indexes)
const
override;
24
QStringList mimeTypes()
const
override;
25
Qt::DropActions supportedDropActions()
const
override;
26
};
27
28
#
endif
MainWindow
[6]
Definition
src_corelib_kernel_qmetaobject.cpp:74
MainWindow::MainWindow
MainWindow()
Definition
src_corelib_kernel_qobject.cpp:79
qtbase
src
widgets
doc
snippets
qlistview-dnd
model.h
Generated on
for Qt by
1.18.0