Implement wxMenuItem::SetFont() for wxQt

This commit is contained in:
dsr 2021-01-25 21:44:17 -05:00 committed by Vadim Zeitlin
parent bb0f2f9768
commit b692dd8aef
2 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,7 @@ public:
virtual QAction *GetHandle() const;
virtual void SetFont(const wxFont& font);
private:
// Qt is using an action instead of a menu item.
wxQtAction *m_qtAction;

View File

@ -128,6 +128,11 @@ void wxMenuItem::SetBitmap(const wxBitmap& bitmap)
}
}
void wxMenuItem::SetFont(const wxFont& font)
{
m_qtAction->setFont(font.GetHandle());
}
QAction *wxMenuItem::GetHandle() const
{
return m_qtAction;