Results 1 to 6 of 6

Thread: How to create a caret in a widget which has no inputbox?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to create a caret in a widget which has no inputbox?

    Quote Originally Posted by Michael_BJFU View Post
    QMyCaret subcalssed from QObject
    are you sure? I hope you made a typo here and you meant QWidget instead of QObject.

  2. #2
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to create a caret in a widget which has no inputbox?

    I think I should make the question clear.
    Now,in the keyPressEvent( QKeyEvent * event ), I can get only one value of specific key by event->key() such as 'a' or 'b';
    But from the picture, we can see before we press down the specific number on keyborad('ç§’' is 1), the keyPressEvent() function will not be called.
    Then, after I kick the number, I can't catch the event either.
    screenshot.jpg


    Added after 17 minutes:


    Quote Originally Posted by nish View Post
    are you sure? I hope you made a typo here and you meant QWidget instead of QObject.
    Yes, you are right. Thanks for your attention.
    Last edited by Michael_BJFU; 15th November 2011 at 13:23.

Similar Threads

  1. Create ui from widget
    By Fastman in forum Qt Programming
    Replies: 2
    Last Post: 29th November 2010, 19:53
  2. How to Create child widget behind parent widget?
    By anupamgee in forum Qt Programming
    Replies: 6
    Last Post: 22nd June 2010, 13:03
  3. How to create my own widget
    By jayreddy in forum Qt Programming
    Replies: 4
    Last Post: 30th October 2009, 11:45
  4. how to create something like widget box in qt designer
    By gregsan in forum Qt Programming
    Replies: 3
    Last Post: 18th July 2008, 15:21
  5. QFormbuilder - How to create widget
    By manivannan_1984 in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2006, 18:47

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.