![]() |
Qt 6.x
The Qt SDK
|
#include "qquicktableview_p.h"
#include "qquicktableview_p_p.h"
#include <QtCore/qtimer.h>
#include <QtCore/qdir.h>
#include <QtQmlModels/private/qqmldelegatemodel_p.h>
#include <QtQmlModels/private/qqmldelegatemodel_p_p.h>
#include <QtQml/private/qqmlincubator_p.h>
#include <QtQmlModels/private/qqmlchangeset_p.h>
#include <QtQml/qqmlinfo.h>
#include <QtQuick/private/qquickflickable_p_p.h>
#include <QtQuick/private/qquickitemviewfxitem_p_p.h>
#include <QtQuick/private/qquicktaphandler_p.h>
#include "moc_qquicktableview_p.cpp"
#include "moc_qquicktableview_p_p.cpp"
Go to the source code of this file.
Macros | |
#define | Q_TABLEVIEW_UNREACHABLE(output) { dumpTable(); qWarning() << "output:" << output; Q_UNREACHABLE(); } |
\qmltype TableView \inqmlmodule QtQuick | |
#define | Q_TABLEVIEW_ASSERT(cond, output) Q_ASSERT((cond) || [&](){ dumpTable(); qWarning() << "output:" << output; return false;}()) |
Variables | |
static const Qt::Edge | allTableEdges [] = { Qt::LeftEdge, Qt::RightEdge, Qt::TopEdge, Qt::BottomEdge } |
static const char * | kRequiredProperties = "_qt_tableview_requiredpropertymask" |
static const char * | kRequiredProperty_selected = "selected" |
static const char * | kRequiredProperty_current = "current" |
static const char * | kRequiredProperty_editing = "editing" |
#define Q_TABLEVIEW_ASSERT | ( | cond, | |
output | |||
) | Q_ASSERT((cond) || [&](){ dumpTable(); qWarning() << "output:" << output; return false;}()) |
Definition at line 1454 of file qquicktableview.cpp.
#define Q_TABLEVIEW_UNREACHABLE | ( | output | ) | { dumpTable(); qWarning() << "output:" << output; Q_UNREACHABLE(); } |
\qmltype TableView \inqmlmodule QtQuick
\inherits Flickable
Provides a table view of items to display data from a model.
A TableView has a \l model that defines the data to be displayed, and a \l delegate that defines how the data should be displayed.
TableView inherits \l Flickable. This means that while the model can have any number of rows and columns, only a subsection of the table is usually visible inside the viewport. As soon as you flick, new rows and columns enter the viewport, while old ones exit and are removed from the viewport. The rows and columns that move out are reused for building the rows and columns that move into the viewport. As such, the TableView support models of any size without affecting performance.
A TableView displays data from models created from built-in QML types such as ListModel and XmlListModel, which populates the first column only in a TableView. To create models with multiple columns, either use \l TableModel or a C++ model that inherits QAbstractItemModel.
A TableView does not include headers by default. You can add headers using the \l HorizontalHeaderView and \l VerticalHeaderView from Qt Quick Controls.
Definition at line 1453 of file qquicktableview.cpp.
|
static |
Definition at line 1456 of file qquicktableview.cpp.
Referenced by QQuickTableViewPrivate::clearEdgeSizeCache(), QQuickTableViewPrivate::nextEdgeToLoad(), and QQuickTableViewPrivate::nextEdgeToUnload().
|
static |
Definition at line 1458 of file qquicktableview.cpp.
Referenced by QQuickTableViewPrivate::setRequiredProperty().
|
static |
Definition at line 1460 of file qquicktableview.cpp.
Referenced by QQuickTableViewPrivate::initItemCallback(), QQuickTableViewPrivate::itemReusedCallback(), QQuickTableViewPrivate::setCurrentOnDelegateItem(), and QQuickTableViewPrivate::updateSelectedOnAllDelegateItems().
|
static |
Definition at line 1461 of file qquicktableview.cpp.
Referenced by QQuickTableViewPrivate::initItemCallback(), and QQuickTableViewPrivate::updateSelectedOnAllDelegateItems().
|
static |
Definition at line 1459 of file qquicktableview.cpp.
Referenced by QQuickTableViewPrivate::initItemCallback(), QQuickTableViewPrivate::itemReusedCallback(), QQuickTableViewPrivate::setSelectedOnDelegateItem(), and QQuickTableViewPrivate::updateSelectedOnAllDelegateItems().