Results 1 to 5 of 5

Thread: remove default action QMenuBar() s60

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: remove default action QMenuBar() s60

    Has anyone else deployed an app for symbian in Qt that made use of menuBar()? I have everything running perfect, almost ready to get signed and submit to Ovi store. I just need for my menu to display only the correct actions. When I get a list of actions held by the menuBar, the action (labeled 'Action') I wish to remove is not in the list.

    When run in the emulator the menu is correct. But when run on my actual device, the issue shows up. All my application logic is fine, if I compile without widgets in my .ui, the menu is correct, but as soon as I add any widget to my gui, the action 'Action' shows up in my menuBar().

  2. #2
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: remove default action QMenuBar() s60

    Most probably you have context menu enabled for the widget. If context menu is enabled then in Symbian port of Qt, context action "Actions" is added to menu in real device.

    Try changing the property of context menu and see whether it makes any difference.

  3. The following 2 users say thank you to tsp for this useful post:

    iliyan (21st December 2010), Lawand (23rd November 2010)

  4. #3
    Join Date
    Apr 2010
    Posts
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: remove default action QMenuBar() s60

    You are exactly right tsp. I needed to call setContextMenu(QAction::NoContextMenu) on every widget created in the ui before I called that widget to be shown (I was doing this via setCentralWidget() but show() and exec() behave similar).

    There is a demo in Qt examples called softkeys in the fluidlauncher that is a great tutorial on how to do everything correctly in 4.6.3 (a lot changed since 4.5.x)

  5. The following user says thank you to pleasuretek for this useful post:

    Lawand (23rd November 2010)

Similar Threads

  1. Remove default buttons
    By Yayati.Ekbote in forum Qt Programming
    Replies: 10
    Last Post: 16th April 2010, 18:27
  2. QTreeView default drag action
    By onamatic in forum Qt Programming
    Replies: 2
    Last Post: 1st March 2010, 07:37
  3. Hide Qmenubar
    By user_mail07 in forum Qt Programming
    Replies: 5
    Last Post: 10th December 2008, 22:16
  4. How to remove default 'ENTER' from QDialogButtonBox
    By janus in forum Qt Programming
    Replies: 6
    Last Post: 12th September 2008, 21:56
  5. No action checked in an exclusive action group
    By SkripT in forum Qt Programming
    Replies: 12
    Last Post: 13th February 2006, 06:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.