In the example below, the menubar must be clicked before it begins tracking the mouse and opening menus. Does anyone know of a way that I can do this without the click? I would like hovering over a menu to open the menu without having to first click on the menubar.
from PySide6.QtWidgets import QApplication, QMainWindow, QMenuBar, QMenu
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
menu_bar = QMenuBar(self)
self.setMenuBar(menu_bar)
for a in "ABC":
menu = QMenu(a, self)
menu_bar.addMenu(menu)
for b in "123":
menu.addAction(a + b)
app = QApplication([])
window = MainWindow()
window.show()
app.exec_()
