×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    28

    Options menu shows empty rectangle on "installing" event filter

    I have the Left soft key attached with options menu.I installed event filter on options menu .The problem is when I did this,(my intension is to have the LSK pop up the menu on first key event, and on second click it should close the menu)the options menu displays empty yellow background.I have set StyleSheets for the background for menu items.What all it shows is an empty yellow rectangle.

    1)What can be the cause of it?
    2)A simple app with no stylesheets set, works fine with the same logic.Is it a problem with style sheets?
    3)Also, if I install event filter on the leftSoftKey, it just disappers....but the menu is displyed/popped with key events.
    Last edited by Sachin Tikare; 2009-02-09 at 13:42.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Options menu shows empty rectangle on "installing" event filter

    Hi,

    I don't think anyone will be able to help with the detail you've provided about the stylesheet issue unless they go and try to reproduce it by themselves. Perhaps you could post some code that demonstrates the problem?

    The other thing I should point out is that softkey handling hasn't been implemented properly yet in Qt for S60. This will be integrated nicely in the later releases. As I understand it the plan is that the QMenuBar associated with the application's main window will be converted automatically into the options menu for the left softkey.

    Mark

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    28

    Re: Options menu shows empty rectangle on "installing" event filter

    hi Mark,
    I dnt think I can post the code, due to proprietary rights...
    But I wud tell step by step procedure of what I have done, so tht u can suggest any change...
    1)A mainWindow widget is set to 240*320
    2)A list widget is created and added to vertical layout.
    3)Left soft key , middle soft key and right soft keys are created and added to horizontal layout (horizontal layout is added to vertical layout , which is set for the main widget)
    4)An options menu is created and set to left soft key.And connect signals triggered is given to the slot "createOptions Menu" function , hwere it creates the menu and sets it to LSK.
    5)Every widget is made transparent so that the png file ca be seen in the background of the main widget.
    6)Now if I install an event filter on options menu, I see the menu empty with no items in it.And if Install event filter on left soft key, the key "options" disappers, but the keypress pops up the menu prperly.

    hope I am clear enough....if any details are required (other than the code! :-) ), please post ...

    Thanks in advance
    Sachin

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Options menu shows empty rectangle on "installing" event filter

    Purely from your description it sounds like either:
    a) You've made an error with the transparency that is making things disappear.
    b) There is a bug in the Qt libraries in the current release.

    However, without the actual code it's pretty impossible to tell.

    Does the same thing happen if you don't use transparency?

    Can you get the items to appear/disappear just by (un-)commenting the line that installs the event filter?

    If you can create a minimal code sample to reproduce this (just the steps required to follow the instructions you gave shouldn't give away any secrets) then I'd suggest posting this to the Qt for S60 feedback mailing list. However, they may not be very interested because the entire event handling and display mechanism that runs behind the scenes is changed in the next release (if this happens on the emulator then you could test it against the latest snapshot to see if it's fixed already).

    Mark

  5. #5
    Registered User
    Join Date
    May 2008
    Posts
    28

    Re: Options menu shows empty rectangle on "installing" event filter

    yes, if I comment out the line of install event filter on options menu, I can easily see themenu items in the menu.
    Also, I commented out the style sheet code and I found it displaying an empty grey menu..just no yellow color now, thats the only difference...
    Can u suggest me a round about idea, for my problem,instead of installingeventfilters: when I press the LSK, the menu should pop up and when I press again, it should close the menu(i.e cancel in S60 options menu).Because this is not happening (second time when I press the LSK, it acts as down n up arrow keys in options menu)I installed event filters which raised this problem.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Options menu shows empty rectangle on "installing" event filter

    I don't think there is one for the Temple release. The key-mapping stuff is pretty basic at the moment - LSK is mapped as Tab so unless you implement an event filter and re-define it to do something else then you're pretty stuck.

    As I've said before, this mapping is going to change in the next release. Trying to work around what's there now is probably not worth the effort.

    Mark

  7. #7
    Registered User
    Join Date
    May 2008
    Posts
    28

    Re: Options menu shows empty rectangle on "installing" event filter

    one more doubt, can we do "Mark All" i.e multiple selection of items in the list through keys?

  8. #8
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Options menu shows empty rectangle on "installing" event filter

    That would be a menu item, although you could potentially implement a shortcut key for it.

    However, I'd put it in the class of input handling code that you should wait for a later release of Qt for S60 before attempting.

    Mark

Similar Threads

  1. Nokia 6600:Joystick pressed in Canvas invokes options menu, how to disable ?
    By kakoskin in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2004-03-10, 16:10
  2. 6600 item commands & options menu
    By random_john_doe in forum Mobile Java General
    Replies: 0
    Last Post: 2003-12-10, 16:18
  3. menu options in SMS messages
    By anr001 in forum Smart Messaging
    Replies: 3
    Last Post: 2003-09-01, 08:13
  4. options menu in FullCanvas?
    By xrsu in forum Mobile Java General
    Replies: 3
    Last Post: 2002-10-17, 09:42
  5. How to add a menu item in the Options menu of a Nokia 7650 ?
    By nmittal in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-08-07, 08:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×