Results 1 to 3 of 3

Thread: QTextEdit - Re-implement key events

  1. #1

    Default Re: QTextEdit - Re-implement key events

    I am attempting to re-implement some or all of the key-events attached to QTextEdit. I want to have some menu actions with keyboard shortcuts which are being over-taken by the QTextEdit. I can't figure out where to start to get this working at all.


    Added after 1 33 minutes:


    Just realized I left something out!

    I am attempting to NOT subclass QTextEdit. This is a member of my subclassed QWidget. I am instead hoping to over-take the QTextEdit events with the QWidget.
    Last edited by QT8seven; 19th December 2011 at 04:57.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QTextEdit - Re-implement key events

    then install an event filter. The documentation has an example about how to use event filters.

  3. #3

    Default Re: QTextEdit - Re-implement key events

    So, I've got the event-filter working, however, I am now wondering how do I pass the event to the menuBar? Do I need to manually check the keys pressed and redirect them or is it possible to have it simply ignore the captured keys and use them toward the setShortcuts?

Similar Threads

  1. How to Implement the Touch Screen Events?
    By rchaitanya in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 25th December 2008, 09:44
  2. Trying to implement QMainWindow...
    By winston2020 in forum Qt Programming
    Replies: 2
    Last Post: 23rd October 2008, 19:12
  3. Replies: 1
    Last Post: 16th February 2007, 07:22
  4. how to implement it ?
    By qtopiahooo in forum Qt Programming
    Replies: 3
    Last Post: 25th October 2006, 17:01
  5. Re-implement mouse events of QTextEdit
    By Ankitha Varsha in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2006, 16:55

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.