[Solved] What is causing the "Action" menu entry under Symbian?



  • Hi,

    my application just failed the OVI QA because it has a function less "Action" entry in its menu. The problem: I am not placing it there and no other platform shows it.

    Also even some of the qt demo applications have this function-less entry. E.g. the openstreetmap demo from qt mobility has this entry and it also does nothing in this.

    Some parts of my own application seem to automatically use this. E.g. a window containing a web view has a "select all" entry there which somehow happens implicit.

    How do i avoid having this "Action" menu entry created? And why does this happen at all (and thus causing my app to fail the QA).



  • Add this line to ctor of your MainWindow when you don't need this item (or remove centralWidget() if you use QWidget or QDialog):
    @
    centralWidget()->setContextMenuPolicy(Qt::NoContextMenu);
    @



  • [quote author="Denis Kormalev" date="1310996452"]
    @
    centralWidget()->setContextMenuPolicy(Qt::NoContextMenu);
    @[/quote]

    Works like a charm, thanks. Yet another #ifdef Q_OS_SYMBIAN in my application ...



  • You are welcome. Don't forget to mark thread as [solved].



  • I actually found several solutions in the net for this. But they all suggest to set Qt::NoContextMenu on all widgets the application owns and not just the centralWidget. Your solution is much nicer!

    P.S.: How do i mark a thread as solved? Just set the Tag?



  • Just edit your first post and prepend the title with [Solved]. This is currently no built-in way to mark threads as solved.


  • Moderators

    Please change your title also by adding [solved] in front of it.

    In the near future we will have better ways to mark a topic as solved.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.