diff options
Diffstat (limited to 'examples/widgets/itemviews/storageview/main.cpp')
-rw-r--r-- | examples/widgets/itemviews/storageview/main.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/examples/widgets/itemviews/storageview/main.cpp b/examples/widgets/itemviews/storageview/main.cpp deleted file mode 100644 index 3bd5392736..0000000000 --- a/examples/widgets/itemviews/storageview/main.cpp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// Copyright (C) 2016 Ivan Komissarov -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include <QApplication> -#include <QShortcut> -#include <QTreeView> - -#include "storagemodel.h" - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - - QTreeView view; - view.resize(640, 480); - view.setWindowTitle("Storage View"); - view.setSelectionBehavior(QAbstractItemView::SelectRows); - - StorageModel *model = new StorageModel(&view); - model->refresh(); - QShortcut *refreshShortcut = new QShortcut(QKeySequence::Refresh, &view); - QObject::connect(refreshShortcut, &QShortcut::activated, model, &StorageModel::refresh); - view.setModel(model); - - int columnCount = view.model()->columnCount(); - for (int c = 0; c < columnCount; ++c) - view.resizeColumnToContents(c); - view.show(); - - return a.exec(); -} |