mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 16:55:25 +08:00
qt 6.5.1 original
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#####################################################################
|
||||
## tableview-span-navigation Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_manual_test(tableview-span-navigation
|
||||
GUI
|
||||
SOURCES
|
||||
main.cpp
|
||||
INCLUDE_DIRECTORIES
|
||||
.
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QApplication>
|
||||
#include <QStandardItemModel>
|
||||
#include <QTableView>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QStandardItemModel model(4, 4);
|
||||
QTableView tableView;
|
||||
tableView.setSizeAdjustPolicy(QTableView::AdjustToContents);
|
||||
tableView.setModel(&model);
|
||||
|
||||
for (int row = 0; row < model.rowCount(); ++row) {
|
||||
for (int column = 0; column < model.columnCount(); ++column) {
|
||||
QModelIndex index = model.index(row, column, QModelIndex());
|
||||
model.setData(index, QVariant(QString("%1,%2").arg(row).arg(column)));
|
||||
}
|
||||
}
|
||||
|
||||
tableView.setSpan(1, 1, 2, 2);
|
||||
|
||||
tableView.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = tableview-span-navigation
|
||||
INCLUDEPATH += .
|
||||
|
||||
QT += widgets
|
||||
|
||||
SOURCES += main.cpp
|
Reference in New Issue
Block a user