Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ set(QT_COMPONENTS
Sql
Test
Widgets
Quick)
Quick
QuickWidgets)

message(STATUS "Trying to find Qt 6...")
find_package(QT NAMES Qt6 QUIET)
Expand Down Expand Up @@ -362,7 +363,8 @@ target_link_libraries(
Qt${QT_VERSION_MAJOR}::Sql
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::WidgetsPrivate
Qt${QT_VERSION_MAJOR}::Quick)
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::QuickWidgets)

if(APPLE)
set(COPYRIGHT_TEXT
Expand Down
1 change: 1 addition & 0 deletions packaging/windows/Notes_Inno_Script_Github.iss
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ Source: "{#SourcePath}\Notes64\Qt6QuickLayouts.dll"; DestDir: "{app}"; Flags: ig
Source: "{#SourcePath}\Notes64\Qt6QuickParticles.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: IsWin64; MinVersion: 10.0.17763
Source: "{#SourcePath}\Notes64\Qt6QuickShapes.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: IsWin64; MinVersion: 10.0.17763
Source: "{#SourcePath}\Notes64\Qt6QuickTemplates2.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: IsWin64; MinVersion: 10.0.17763
Source: "{#SourcePath}\Notes64\Qt6QuickWidgets.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: IsWin64; MinVersion: 10.0.17763
Source: "{#SourcePath}\Notes64\Qt6Sql.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: IsWin64; MinVersion: 10.0.17763
Source: "{#SourcePath}\Notes64\Qt6Svg.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: IsWin64; MinVersion: 10.0.17763
Source: "{#SourcePath}\Notes64\Qt6Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: IsWin64; MinVersion: 10.0.17763
Expand Down
15 changes: 7 additions & 8 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@
m_treeModel(new NodeTreeModel(this)),
m_treeViewLogic(nullptr),
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
m_kanbanQuickView(nullptr),
m_kanbanWidget(this),
m_kanbanWidget(nullptr),
#endif
m_editorSettingsQuickView(nullptr),
m_editorSettingsWidget(new QWidget(this)),
Expand Down Expand Up @@ -1205,11 +1204,11 @@
// https://doc.qt.io/qt-6/qtquick-quickwidgets-qquickwidgetversuswindow-opengl-example.html

QUrl source("qrc:/qt/qml/kanbanMain.qml");
m_kanbanQuickView.rootContext()->setContextProperty("noteEditorLogic", m_noteEditorLogic);
m_kanbanQuickView.rootContext()->setContextProperty("mainWindow", this);
m_kanbanQuickView.setSource(source);
m_kanbanQuickView.setResizeMode(QQuickView::SizeRootObjectToView);
m_kanbanWidget = QWidget::createWindowContainer(&m_kanbanQuickView, this);
m_kanbanWidget = new QQuickWidget(this);
m_kanbanWidget->rootContext()->setContextProperty("noteEditorLogic", m_noteEditorLogic);
m_kanbanWidget->rootContext()->setContextProperty("mainWindow", this);
m_kanbanWidget->setSource(source);
m_kanbanWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
m_kanbanWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_kanbanWidget->hide();
m_ui->verticalLayout_textEdit->insertWidget(m_ui->verticalLayout_textEdit->indexOf(m_textEdit), m_kanbanWidget);
Expand Down Expand Up @@ -1626,7 +1625,7 @@
m_treeViewLogic = new TreeViewLogic(m_treeView, m_treeModel, m_dbManager, m_listView, this);
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
m_noteEditorLogic = new NoteEditorLogic(m_textEdit, m_editorDateLabel, m_searchEdit, m_kanbanWidget, m_ui->tagListView, m_tagPool, m_dbManager, this);
m_kanbanQuickView.rootContext()->setContextProperty("noteEditorLogic", m_noteEditorLogic);
m_kanbanWidget->rootContext()->setContextProperty("noteEditorLogic", m_noteEditorLogic);
#else
m_noteEditorLogic = new NoteEditorLogic(m_textEdit, m_editorDateLabel, m_searchEdit, m_ui->tagListView, m_tagPool, m_dbManager, this);
#endif
Expand Down Expand Up @@ -3676,7 +3675,7 @@
}
case QEvent::ActivationChange: {
if (m_editorSettingsWidget->isHidden()) {
QApplication::setActiveWindow(this); // TODO: The docs say this function is deprecated but it's the only one

Check warning on line 3678 in src/mainwindow.cpp

View workflow job for this annotation

GitHub Actions / macOS / Build (debug, homebrew (qt6), macos-13)

'setActiveWindow' is deprecated: Use QWidget::activateWindow() instead. [-Wdeprecated-declarations]
// that works in returning the user input from m_editorSettingsWidget
// Qt::Popup
m_textEdit->setFocus();
Expand Down
4 changes: 2 additions & 2 deletions src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <QtGlobal>
#include <QWidget>
#include <QQuickView>
#include <QQuickWidget>
#include <QQmlContext>
#include <QVariant>
#include <QJsonObject>
Expand Down Expand Up @@ -168,8 +169,7 @@ public slots:
NodeTreeModel *m_treeModel;
TreeViewLogic *m_treeViewLogic;
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
QQuickView m_kanbanQuickView;
QWidget *m_kanbanWidget;
QQuickWidget *m_kanbanWidget;
#endif
QQuickView m_editorSettingsQuickView;
QWidget *m_editorSettingsWidget;
Expand Down
Loading