Edward Welbourne 5651be517a XBEL stream example: use constructor initialization
The treeWidget member of MainWindow could be initialized before the
body of the constructor, enabling it to be a *const variable.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: If4a3b04729bc7fa5859ca88183eec376f6992455
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-07-17 14:50:51 +02:00

36 lines
596 B
C++

// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
QT_BEGIN_NAMESPACE
class QTreeWidget;
QT_END_NAMESPACE
//! [0]
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
public slots:
void open();
void saveAs();
void about();
#if QT_CONFIG(clipboard) && QT_CONFIG(contextmenu)
void onCustomContextMenuRequested(const QPoint &pos);
#endif
private:
void createMenus();
QTreeWidget *const treeWidget;
};
//! [0]
#endif