0

How can i hide the scrollbar context menu that appears when you right-click on it?

Darkgaze
  • 2,280
  • 6
  • 36
  • 59

1 Answers1

0

If you have a QScrollArea, first you access both scrolls, and then you change the context menu policy to NoContextPolicy by using:

scrollArea->verticalScrollBar()->setContextMenuPolicy(Qt::NoContextMenu);
scrollArea->horizontalScrollBar()->setContextMenuPolicy(Qt::NoContextMenu);
Darkgaze
  • 2,280
  • 6
  • 36
  • 59