Results 1 to 4 of 4

Thread: Disable Return on QTextEdit

  1. #1
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Disable Return on QTextEdit

    Hi everybody,

    OS:WINXP
    QT 4.1.3

    I would like to disable a return press on my textedit. Is that possible?

    Thanks
    Think DigitalGasoline

  2. #2
    Join Date
    Apr 2007
    Posts
    44
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Disable Return on QTextEdit

    possible
    just reimplement virtual void keyPressEvent(QKeyEvent *);

    and ignore message when return key press.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Disable Return on QTextEdit

    You can apply an event filter or reimplement event or key press event and filter out return presses.

  4. The following user says thank you to wysota for this useful post:

    raphaelf (23rd May 2007)

  5. #4
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Disable Return on QTextEdit

    thanks wysota, i will try
    Think DigitalGasoline

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.