Results 1 to 2 of 2

Thread: how to enable tab key as input in textArea if it is on a tab

  1. #1
    Join Date
    May 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default how to enable tab key as input in textArea if it is on a tab

    Hi,

    I am new to Qt and qml.
    I want to write a simple code editor.
    My problem is that if I use TextArea on a Tab than its no longer processes tab key as an input but rather it just switch focus to the "next" qml object.
    Here is a simple sample code.
    Qt Code:
    1. Window {
    2. visible: true
    3.  
    4. TabView
    5. {
    6. id: tmptv
    7. anchors.fill: parent
    8. Tab {
    9. id: tmptab
    10. title: "tmp1"
    11. active: true
    12. sourceComponent: TextArea {
    13. anchors.fill: parent
    14. }
    15. }
    16. }
    17. }
    To copy to clipboard, switch view to plain text mode 
    I think the problem is about that the tab key input somehow not propagated toward TextArea instead it is processed by the Tab.
    Any suggestion how to make it possible to accept tab key in this case as input for code editing?
    Thanks in advance!

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to enable tab key as input in textArea if it is on a tab

    Very strange behavior indeed, could be a bug in TextArea.

    But it works with TextEdit.

    Cheers,
    _

Similar Threads

  1. Textarea is not Updating when set from C++
    By Cerberus in forum Qt Quick
    Replies: 3
    Last Post: 6th September 2015, 22:41
  2. QML TextArea zooming/scaling
    By mh8411 in forum Qt Quick
    Replies: 1
    Last Post: 27th December 2014, 12:17
  3. qml Textarea
    By codeman in forum Qt Quick
    Replies: 4
    Last Post: 13th January 2014, 18:51
  4. QtWebKit and clickEvent from textarea
    By keen in forum Qt Programming
    Replies: 0
    Last Post: 30th June 2010, 15:15
  5. How to enable keyboard and mouse as input in qtopia-2.1.1
    By hvreddy1110 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 12th October 2006, 10:30

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.