JS8Call-Improved master
Loading...
Searching...
No Matches
LazyFillComboBox.h
Go to the documentation of this file.
1
5
6#ifndef LAZY_FILL_COMBO_BOX_HPP__
7#define LAZY_FILL_COMBO_BOX_HPP__
8
9#include <QComboBox>
10
11class QWidget;
12
13
22class LazyFillComboBox : public QComboBox {
23 Q_OBJECT
24
25 public:
29 Q_SIGNAL void about_to_show_popup();
30
34 Q_SIGNAL void popup_hidden();
35
40 explicit LazyFillComboBox(QWidget *parent = nullptr) : QComboBox{parent} {}
41
45 void showPopup() override {
46 Q_EMIT about_to_show_popup();
47 QComboBox::showPopup();
48 }
49
53 void hidePopup() override {
54 QComboBox::hidePopup();
55 Q_EMIT popup_hidden();
56 }
57};
58
59#endif
Q_SIGNAL void popup_hidden()
Emitted after the popup has been hidden.
LazyFillComboBox(QWidget *parent=nullptr)
Construct a LazyFillComboBox.
Definition LazyFillComboBox.h:40
Q_SIGNAL void about_to_show_popup()
Emitted immediately before the popup is shown.
void hidePopup() override
Override to emit popup_hidden() after hiding the popup.
Definition LazyFillComboBox.h:53
void showPopup() override
Override to emit about_to_show_popup() before showing.
Definition LazyFillComboBox.h:45