Skip to content

Commit

Permalink
Add option to disable Qt Quick window (fixes #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba160 committed Jun 15, 2024
1 parent 424efc8 commit 93592ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion QtGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ static int pluginStart() {
plugin.plugin.message = pluginMessage_wrapper;

startWidgets();
startQuick();

if (!USE_WIDGETS || DBAPI->conf_get_int("qgui.show_qtquick_window", false))
startQuick();

// GUI thread loop
app->exec();
Expand Down
10 changes: 10 additions & 0 deletions dbapi/actions/ActionsConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,16 @@ ActionsConfig::ActionsConfig(QObject *parent, DBApi *Api)
m_actions.append(action);
}

ActionSpec quick = {
.path = QStringList{"View", "Qt Quick Window (requires restart)"},
.id = "q_qtquick_window",
.loc = DBAction::ACTION_LOC_HOTKEY | DBAction::ACTION_LOC_MENUBAR,
.arg = DBAction::ACTION_ARG_NONE,
.props = QHash<QString,QVariant>{{"config_default", QVariant(false)}, {"config", QVariant(QString("qgui.show_qtquick_window"))}}
};
DBActionConfigBool *quick_action = new DBActionConfigBool(this, Api, quick);
m_actions.append(quick_action);

}

ActionsConfig::~ActionsConfig() {
Expand Down

0 comments on commit 93592ab

Please sign in to comment.