×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    47

    left soft button and QT

    Hi,

    I have a question about left soft keys.

    (On my test)

    The directional soft key works as arrows key

    The soft central button works as enter

    The right soft key work as put application in background

    The red soft key work as close application

    The left soft key work as ???, how can I bind some function on it? (In python is very easy, I think also in QT but I don't have any idea how )

    Thank you

    PS: I am able to create a qt-menu when some signal is generated.

  2. #2
    Registered User
    Join Date
    Aug 2007
    Posts
    6

    Re: left soft button and QT

    Hi,

    According to my experience, 'left soft key' changes focus. It is similar to TAB key in windows.

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

    Smile Re: left soft button and QT

    Hi,

    thank you ucho!

    I wrote a simply program that capture keyPressEvent, and the code of left soft key is 16777217 that is the code of TAB on my linux desktop!
    So is not similar to TAB but is equal to TAB

    I do some other test:

    - the soft button used to cancel is mapped on Backspace (event->key 16777219);
    - the green soft button is mapped on event->key 16842753 (I don't have any idea which keyboard button is. Perhaps nothing so you can answer at the phone without problems with QT.)

    Code:
    void MainWindow::keyPressEvent(QKeyEvent* event)
    {
        input.setNum(event->key(), 10);
        ui->textBrowser->append((input));
    }
    PS: on S60 left sof key is used to open the options menu, is not strange use it to change de focus and not as usual to open menu (like a right mouse click, I know that mouse event are reserved for S60 5th touch screen)?
    Last edited by gino.rossi; 2009-01-23 at 10:49.

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

    Re: left soft button and QT

    Hi,

    Please don't spend too long looking at the softkey mappings in the current release. They are not final. You should find much more what you expect in the next release.

    The QMenuBar from the application's main window should allow you to set the options menu up and the softkeys should work as expected for a phone. You should also find the widgets look a lot different.

    Mark

  5. #5
    Registered User
    Join Date
    Jul 2005
    Posts
    16

    Re: left soft button and QT

    implement event(QEvent *e) function in your app or install a event filter and implement eventFilter(QObject *object, QEvent *e) function you can recive LSK as Qt::Key_Tab event.


    Qt::Key_Tab is a QKeyEvent you need to typecast QEvent to QKeyEvent

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

    Re: left soft button and QT

    Quote Originally Posted by indvin
    implement event(QEvent *e) function in your app or install a event filter and implement eventFilter(QObject *object, QEvent *e) function you can recive LSK as Qt::Key_Tab event.


    Qt::Key_Tab is a QKeyEvent you need to typecast QEvent to QKeyEvent
    Thank you indvin for your suggestion, but if I bind a menu on Qt::Key_Tab I lost some usability in the QT interfaces, I do some test about it.

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

    Re: left soft button and QT

    Like I said before - wait for the next release - this area is going to change!

    Mark

  8. #8
    Registered User
    Join Date
    Nov 2008
    Posts
    17

    Re: left soft button and QT

    Hello,

    when will the next release be (released) ?

Posting Permissions

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