Results 1 to 7 of 7

Thread: OnScreenKeyboard tab focus problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default OnScreenKeyboard tab focus problem

    hi experts,
    My environment is linux openembedded , qt 4.7(embedded).
    I'm implementing a onscreen keyboard. No physical keyboard is not attached to the device.
    Using the following code Im sending the keypress events to the current window having lineedits.

    Qt Code:
    1. QString qstrKeyId="0x01000001";
    2. int nKeyId = qstrKeyId.toInt(&bIsOk, 16);
    3. QString qstrKeyIdString=QChar(qstrKeyId.toInt(0, 16));
    4. QKeyEvent keyEvent(QEvent::KeyPress,nKeyId,Qt::NoModifier,qstrKeyIdString);
    5. QWidget *focusWidget = QApplication::focusWidget();
    6. if(focusWidget) /* send the key to focused widget */
    7. {
    8. QApplication::sendEvent(focusWidget, &keyEvent);
    9. }
    To copy to clipboard, switch view to plain text mode 



    My problems are
    1) when I press the onscreen tab key, the navigation is working good, but i cant see the blinking cursor in the lineedits.
    when the line edit is having no texts , the blinking cursor in the lineedit is not visible.
    But when the lineedit is having some texts, the blinking cursor in the lineedit is visible.
    This problem is only with the openembedded. In Ubuntu pC, i can see the vertical beamer in the empty linedit.


    In summarize, my problem is: when i press tab key, I cant find the vertical text cursor in the empty lineedits.
    my question is: How to show the vertical beamer in the empty lineedit.
    Im sending the tab key value(0x01000001) using sendevent, is there any problem?


    2)when i press the tab, the backspace key functionality is not working.But backspace functionality is working well for otherkeys.
    may be the focus problem affects this also. So, when pressing the tabkey, how to set the focus on the lineedit?



    Any hints?
    (sorry for the multiposting)
    Thanks
    Bala
    Last edited by BalaQT; 23rd March 2011 at 11:39. Reason: multipost fixed

Similar Threads

  1. Problem of Focus QMacNativeWidget
    By skuallpa in forum Qt Programming
    Replies: 1
    Last Post: 21st July 2010, 14:19
  2. Focus problem
    By waynew in forum Qt Programming
    Replies: 4
    Last Post: 1st May 2010, 01:24
  3. QX11EmbedContainer problem with focus
    By PhoenixRevived in forum Qt Programming
    Replies: 0
    Last Post: 14th November 2007, 05:34
  4. Tab/Enter focus problem
    By b1 in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2006, 23:34

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.