Results 1 to 3 of 3

Thread: QTextEdit and "Enter" press

  1. #1
    Join Date
    Jan 2006
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QTextEdit and "Enter" press

    Hello all!

    I want to use QTextEdit in my chat dialog and send messages via "Enter" press.
    How to change QTextEdit's behaviour (on Enter press) without reimplementing keyPressEvent???

    I can't use class derived of QTextEdit, because it should be used in QT Desinger (i.e. only standart widgets are allowed).

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: QTextEdit and "Enter" press

    I dont understand you...You want create plugin for designer alike custom widget?
    Use eventFilter
    a life without programming is like an empty bottle

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTextEdit and "Enter" press

    You can use an event filter to catch events without subclassing...

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.