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. [SOLVED] Hiding File Menu from browser demo
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Hiding File Menu from browser demo

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.4k 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
    jbrooksuk
    wrote on last edited by
    #1

    I've tried removing the File menu from the Browser demo that comes with qt-everywhere-opensource-src-4.6.4 however every time I do something or another crashes, this is obviously because the handles aren't there any more when something attempts to hook into it.

    Is there a sure fire way to remove this menu and the toolbar without messing everything else up?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      When you say "removing", what are you removing? And more importantly, what are you leaving?

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

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

        Just stopping it from displaying really, I removed @setupMenu()@ from @browsermainwindow.cpp@ so I assume something else is relying on using the handles @setupMenu()@ creates.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          You should still create the menu, but call menuBar()->setVisible(false) to hide it if you'd like. You can add that line any time after setupMenu() is called (or at the end of that method, itself.)

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

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

            Perfect! I completely forgot to check out the default settings since they control the layout as well. Thank you!

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              Great! Be sure and label the title as [Solved]. Thanks!

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              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