The term "Debug Window" is not accurate IMO and we should consider renaming it to a more user-friendly term (only visible in the window title as well as from the tray menu).
{
    onDisplayUnitsClicked(event->pos());
}
void UnitDisplayStatusBarControl::createContextMenu()
{
    menu = new QMenu(this);
    for (const BitcoinUnits::Unit u : BitcoinUnits::availableUnits())
    {
        QAction *menuAction = new QAction(QString(BitcoinUnits::longName(u)), this);
        menuAction->setData(QVariant(u));
        menu->addAction(menuAction);
    }
    connect(menu, &QMenu::triggered, this, &UnitDisplayStatusBarControl::onMenuSelection);
}
void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *_optionsModel)