×

Discussion Board

Results 1 to 9 of 9

Thread: clicked event

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    47

    clicked event

    Hi,

    I have some question about the soft keys of phone. If I press the directional keys they work as usually (arrow key on a standard keyboards). But the central and the left soft button are not managed by QT as mouse click. If I press the central soft key the focus is given on the widget but the signal clicked is not emitted.

    Code:
    connect(calendar, SIGNAL(clicked(QDate)), this, SLOT(selectedDateClicked()));
    How can I emit a clicked signal pressing, for instance, the central soft key?

    Thank you.

  2. #2
    Regular Contributor
    Join Date
    May 2007
    Posts
    468

    Re: clicked event

    Hi,
    the central button atleast for me it works just fine with QPushButtons f.ex. Just ensure that the component has this little red square in the left corner (indicating focus) before clicking.

    Cheers,
    Jack

  3. #3
    Regular Contributor
    Join Date
    May 2007
    Posts
    468

    Re: clicked event

    It does have issues that the "red box" doesn't always appear even if the focus is there (you can see the button visually changing). This is easy to see with a trivial example of three buttons and changing the focus back and forward. Usually the red box appears but sometimes not. Gotta be a bug...

    Thanks,
    Jack

  4. #4
    Registered User
    Join Date
    Aug 2008
    Posts
    47

    Re: clicked event

    I am using a QCalendarWidget and on the calendar grid there are no one red box like using buttons or text areas so I have some problem .

  5. #5
    Regular Contributor
    Join Date
    May 2007
    Posts
    468

    Re: clicked event

    Hi,
    It's good to notice that:
    a) Qt for S60 is in early phase
    b) all the functionality, including ui widgets, will be similar as in other platforms.

    Have you tested the same Qt code to work in f.ex in win/linux? What ever works in other platforms but not in S60 should be interpret as "not supported yet".

    Cheers,
    Jack

  6. #6
    Registered User
    Join Date
    Aug 2008
    Posts
    47

    Re: clicked event

    Hi,

    I was in vacation so i reply only now

    Quote Originally Posted by Jack Torrance View Post
    Have you tested the same Qt code to work in f.ex in win/linux? What ever works in other platforms but not in S60 should be interpret as "not supported yet".
    Yes, I tested my code under linux and work fine. The code is the same for linux and S60 no #IFDEF or other difference.

  7. #7
    Registered User
    Join Date
    Aug 2008
    Posts
    47

    Re: clicked event

    Hi,

    today I restart to work on my calendar widget, there is a way to capture the signal: central bottom pressed (on a cell of a QCalendarWidget)?

    On linux the same code work, if I do a left click with the mouse on a cell the event is captured but on cell not .

    If some one is interested I can share my line of code.

    Thank you

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

    Re: clicked event

    I don't believe a key event should be a mouse click event by default (that will be reserved for touch screen events) but you should be able to either implement an appropriate key press handler or install an event filter and make the key press generate the clicked event.

    This area is going to change in the next version of Qt on S60 though - expect much better keypad integration than we have now (which is basically hard-coded keys actions). As Jack said, the feature should be considered "not implemented yet" if it works on Linux and not on S60.

    Mark

  9. #9
    Registered User
    Join Date
    Aug 2008
    Posts
    47

    Re: clicked event

    Hi,

    I find a solution, QT bind soft central button as ENTER (for QCalendarWidget at least) so if I capture the event activated (QCalendarWidget SIGNAL) I can manage the event central button pressed on a calendar cell.



    Thank you to all people that answer in these post and for their time

Similar Threads

  1. Help me for touch Screen Event Handling
    By nil.bagul in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-28, 11:22
  2. CLogEvent problem
    By silviuccia in forum Symbian
    Replies: 2
    Last Post: 2006-12-22, 15:28
  3. Replies: 0
    Last Post: 2006-04-27, 15:21
  4. Replies: 1
    Last Post: 2003-02-20, 07:48

Posting Permissions

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