diff options
| author | MohammadHossein Qanbari <mohammad.qanbari@qt.io> | 2024-08-23 17:12:51 +0200 |
|---|---|---|
| committer | MohammadHossein Qanbari <mohammad.qanbari@qt.io> | 2024-09-02 22:46:58 +0200 |
| commit | 8330154be6401569450b97512b6718b0f31d6eaf (patch) | |
| tree | fc7736297b321a2592dcaf59f7e7e1edc7cbe8fe /examples/quick/quickwidgets/qmlpreviewer/widgets/mainwindow.h | |
| parent | 2f9e1e55766af3123189ccddbfa63139ecf53fec (diff) | |
QML Previewer Example: Add Error List and Line Numbers
Implement LineNumberArea to display line numbers, based on the Code
Editor Example documentation. Introduce QListView with ErrorListModel
to show errors and warnings. Double-clicking an error in the list moves
the code editor's cursor to the corresponding position.
Update shortcut functionality to work only on platforms where the
feature is available. Related code has been modified accordingly.
Fixes: QTBUG-128227
Pick-to: 6.8
Change-Id: Icb66280a5360b015280afc756f8a827247a2ebaf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'examples/quick/quickwidgets/qmlpreviewer/widgets/mainwindow.h')
| -rw-r--r-- | examples/quick/quickwidgets/qmlpreviewer/widgets/mainwindow.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/quick/quickwidgets/qmlpreviewer/widgets/mainwindow.h b/examples/quick/quickwidgets/qmlpreviewer/widgets/mainwindow.h index 89cbb6c332..22ce63d34b 100644 --- a/examples/quick/quickwidgets/qmlpreviewer/widgets/mainwindow.h +++ b/examples/quick/quickwidgets/qmlpreviewer/widgets/mainwindow.h @@ -6,8 +6,8 @@ #include <QMainWindow> +class PreviewWidget; class EditorWidget; -class QQuickWidget; class QFileSystemWatcher; class MainWindow : public QMainWindow @@ -31,11 +31,12 @@ private slots: private: EditorWidget *m_editorWidget = nullptr; - QQuickWidget *m_previewWidget = nullptr; + PreviewWidget *m_previewWidget = nullptr; QFileSystemWatcher *m_fileWatcher = nullptr; QAction *m_openAction = nullptr; QAction *m_saveAction = nullptr; QAction *m_closeAction = nullptr; QAction *m_reloadAction = nullptr; + QAction *m_quitAction = nullptr; }; #endif // MAINWINDOW_H |
