Important: Please read the Qt Code of Conduct -

QToolbar context menu - how did anything get added to it?

  • I've got this QToolBar at the top of the MainWindow, and right-clicking on it presents a context menu of dockable windows, to show them or not.

    I cannot find where the entries on this context menu are set. I've been rooting through the QToolBar documentation hoping to see something obvious like "addSomethingToContextMenu" but to no avail.

    Can anyone give me a hint on function names to search for in the code, or some other way to find how this context menu is being set?

  • Lifetime Qt Champion


    From the top of my head you should rather look at the QMainWindow source for that

Log in to reply