! catches the MouseButtonPress-event and hides the tree view on mouse clicking. */
| 57 | catches the MouseButtonPress-event and hides the tree view on mouse clicking. |
| 58 | */ |
| 59 | bool ThemesComboBox::eventFilter(QObject* object, QEvent* event) { |
| 60 | if ((object == m_groupBox) && event->type() == QEvent::MouseButtonPress) { |
| 61 | m_groupBox->hide(); |
| 62 | this->setFocus(); |
| 63 | return true; |
| 64 | } |
| 65 | |
| 66 | return QComboBox::eventFilter(object, event); |
| 67 | } |
| 68 | |
| 69 | void ThemesComboBox::handleThemeChanged(const QString& theme) { |
| 70 | if (theme != currentText()) { |