forked from qt-creator/qt-creator
Fix the button order in the "Choose Topic" dialog (help plugin)
Currently, the Display (confirm) button is located on the left of the Close button on all platforms. This looks odd on macOS, as the confirmation buttons are normally located at the very right there. This commit fixes this issue by using a QDialogButtonBox to display the buttons. Task-number: QTCREATORBUG-10440 Change-Id: I453e01d9cce01ad2f5620099defa0e71477398b7 Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -64,9 +64,9 @@ TopicChooser::TopicChooser(QWidget *parent, const QString &keyword,
|
||||
if (m_filterModel->rowCount() != 0)
|
||||
ui.listWidget->setCurrentIndex(m_filterModel->index(0, 0));
|
||||
|
||||
connect(ui.buttonDisplay, &QPushButton::clicked,
|
||||
connect(ui.buttonBox, &QDialogButtonBox::accepted,
|
||||
this, &TopicChooser::acceptDialog);
|
||||
connect(ui.buttonCancel, &QPushButton::clicked,
|
||||
connect(ui.buttonBox, &QDialogButtonBox::rejected,
|
||||
this, &TopicChooser::reject);
|
||||
connect(ui.listWidget, &QListView::activated,
|
||||
this, &TopicChooser::activated);
|
||||
|
@@ -34,54 +34,12 @@
|
||||
<widget class="QListView" name="listWidget"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="unnamed">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="Horizontal Spacing2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonDisplay">
|
||||
<property name="text">
|
||||
<string>&Display</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonCancel">
|
||||
<property name="text">
|
||||
<string>&Close</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
Reference in New Issue
Block a user