Avoid creating unnecessary event loops

The `exec()` method will create another event loop and transfer
control over there which might introduce unexpected bugs.
This commit is contained in:
Chocobo1
2019-06-03 15:10:19 +08:00
parent 206bb018dd
commit 3748b995ff
22 changed files with 509 additions and 476 deletions

View File

@@ -48,8 +48,9 @@ ComboBoxMenuButton::ComboBoxMenuButton(QWidget *parent, QMenu *menu)
void ComboBoxMenuButton::showPopup()
{
QPoint p = mapToGlobal(QPoint(0, height()));
m_menu->exec(p);
const QPoint p = mapToGlobal(QPoint(0, height()));
m_menu->popup(p);
QComboBox::hidePopup();
}