merge bitcoin-core/gui#219: Prevent the main window popup menu

This commit is contained in:
Kittywhiskers Van Gogh 2024-06-09 15:48:10 +00:00
parent 7774bdb423
commit dc9b25e04c
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

@ -95,6 +95,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const NetworkStyle* networkStyle,
move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
}
setContextMenuPolicy(Qt::PreventContextMenu);
#ifdef ENABLE_WALLET
enableWallet = WalletModel::isWalletEnabled();
#endif // ENABLE_WALLET
@ -669,7 +671,6 @@ void BitcoinGUI::createToolBars()
{
QToolBar *toolbar = new QToolBar(tr("Tabs toolbar"));
appToolBar = toolbar;
toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
toolbar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
toolbar->setToolButtonStyle(Qt::ToolButtonTextOnly);
toolbar->setMovable(false); // remove unused icon in upper left corner