Implement dropdown and popup events for wxComboBox on Qt
Closes https://github.com/wxWidgets/wxWidgets/pull/1005
This commit is contained in:
committed by
Vadim Zeitlin
parent
a1adc2efa4
commit
1c06a62830
@@ -20,6 +20,8 @@ class wxQtComboBox : public wxQtEventSignalHandler< QComboBox, wxComboBox >
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxQtComboBox( wxWindow *parent, wxComboBox *handler );
|
wxQtComboBox( wxWindow *parent, wxComboBox *handler );
|
||||||
|
virtual void showPopup() wxOVERRIDE;
|
||||||
|
virtual void hidePopup() wxOVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void activated(int index);
|
void activated(int index);
|
||||||
@@ -36,6 +38,20 @@ wxQtComboBox::wxQtComboBox( wxWindow *parent, wxComboBox *handler )
|
|||||||
this, &wxQtComboBox::editTextChanged);
|
this, &wxQtComboBox::editTextChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxQtComboBox::showPopup()
|
||||||
|
{
|
||||||
|
wxCommandEvent event( wxEVT_COMBOBOX_DROPDOWN, GetHandler()->GetId() );
|
||||||
|
EmitEvent( event );
|
||||||
|
QComboBox::showPopup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxQtComboBox::hidePopup()
|
||||||
|
{
|
||||||
|
wxCommandEvent event( wxEVT_COMBOBOX_CLOSEUP, GetHandler()->GetId() );
|
||||||
|
EmitEvent( event );
|
||||||
|
QComboBox::hidePopup();
|
||||||
|
}
|
||||||
|
|
||||||
void wxQtComboBox::activated(int WXUNUSED(index))
|
void wxQtComboBox::activated(int WXUNUSED(index))
|
||||||
{
|
{
|
||||||
wxComboBox *handler = GetHandler();
|
wxComboBox *handler = GetHandler();
|
||||||
|
Reference in New Issue
Block a user