Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMainWindow Context Menu
Qt 6.11 is out! See what's new in the release blog

QMainWindow Context Menu

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 5.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jdbastardy
    wrote on last edited by
    #1

    I am using QMainWindow as ym to implement standard application window and I am using toolbars and dock widgets.
    I want the Toolbars and Widgets to be showable by the users preferences. I know that QMainWindow creates a context menu for handling this behaviour. However is there any way to use this context menu in other sources (for exampe to be added under a View menu into the menu bar)? I do not want to implent the whole code to show and hide widgets again in the menubar while it is available elsewhere.

    http://mattias-cibien.co.cc

    • Prepare for Qt consequences.
    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      I suggest you look at the Qt code, where it is implemented. That is the easiest way to check, whether that is usable from outside...

      But I know no interface for that...

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jdbastardy
        wrote on last edited by
        #3

        Mmmm...Thank you very much. I'll have a check...

        http://mattias-cibien.co.cc

        • Prepare for Qt consequences.
        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Is "QMainWindow::createPopupMenu() ":http://doc.qt.nokia.com/stable/qmainwindow.html#createPopupMenu what you need?

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jdbastardy
            wrote on last edited by
            #5

            [quote author="Volker" date="1295301672"]Is "QMainWindow::createPopupMenu() ":http://doc.qt.nokia.com/stable/qmainwindow.html#createPopupMenu what you need?[/quote]
            Yep... Thanks Volker.... I didn't see it.

            http://mattias-cibien.co.cc

            • Prepare for Qt consequences.
            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved