QmlDesigner: Add alternative shortcut for macOS to reload property sheet

Change-Id: I4e823e39812b06f7131c610a0ac259df722b5b12
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2018-08-27 13:32:11 +02:00
parent bd59472f40
commit 91a0280394

View File

@@ -80,7 +80,10 @@ PropertyEditorView::PropertyEditorView(QWidget *parent) :
{ {
m_qmlDir = PropertyEditorQmlBackend::propertyEditorResourcesPath(); m_qmlDir = PropertyEditorQmlBackend::propertyEditorResourcesPath();
m_updateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F3), m_stackedWidget); if (Utils::HostOsInfo().isMacHost())
m_updateShortcut = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_F3), m_stackedWidget);
else
m_updateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F3), m_stackedWidget);
connect(m_updateShortcut, &QShortcut::activated, this, &PropertyEditorView::reloadQml); connect(m_updateShortcut, &QShortcut::activated, this, &PropertyEditorView::reloadQml);
m_stackedWidget->setStyleSheet(Theme::replaceCssColors( m_stackedWidget->setStyleSheet(Theme::replaceCssColors(