QKeySequenceEdit::setClearButtonEnabled was introduced in Qt 6.4.

This commit is contained in:
Roman Telezhynskyi 2023-10-23 17:59:23 +03:00
parent 06dd217130
commit 5c1d8476ff
2 changed files with 5 additions and 5 deletions

View File

@ -82,6 +82,10 @@ VShortcutDialog::VShortcutDialog(int index, QWidget *parent)
m_shortcutObject = VAbstractApplication::VApp()->GetShortcutManager()->GetShortcutsList().value(index); m_shortcutObject = VAbstractApplication::VApp()->GetShortcutManager()->GetShortcutsList().value(index);
ui->keySequenceEdit->setKeySequence(m_shortcutObject.shortcuts.join(", "_L1)); ui->keySequenceEdit->setKeySequence(m_shortcutObject.shortcuts.join(", "_L1));
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
ui->keySequenceEdit->setClearButtonEnabled(true);
#endif
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -15,11 +15,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QKeySequenceEdit" name="keySequenceEdit"> <widget class="QKeySequenceEdit" name="keySequenceEdit"/>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">