Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Tab order stuck inside qtextedit
Qt 6.11 is out! See what's new in the release blog

Tab order stuck inside qtextedit

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 2.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WhatIf
    wrote on last edited by
    #1

    Hi,

    I have a form which consists of several qlineedits followed by a qtextedit and finally 2 buttons (submit, cancel). The problem is the tab order gets stuck inside the qtextedit and doesn't move to the buttons when the tab button is clicked. Instead, the tab(s) are entered into the qtextedit.

    How to get around this to allow tab clicks to reach the buttons?

    Joel BodenmannJ 1 Reply Last reply
    0
    • W WhatIf

      Hi,

      I have a form which consists of several qlineedits followed by a qtextedit and finally 2 buttons (submit, cancel). The problem is the tab order gets stuck inside the qtextedit and doesn't move to the buttons when the tab button is clicked. Instead, the tab(s) are entered into the qtextedit.

      How to get around this to allow tab clicks to reach the buttons?

      Joel BodenmannJ Offline
      Joel BodenmannJ Offline
      Joel Bodenmann
      wrote on last edited by Joel Bodenmann
      #2

      Use the tabChangesFocus property. The default value is false.
      Simply change it using QTextEdit::setTabChangesFocus(true).

      Industrial process automation software: https://simulton.com
      Embedded Graphics & GUI library: https://ugfx.io

      W 1 Reply Last reply
      0
      • Joel BodenmannJ Joel Bodenmann

        Use the tabChangesFocus property. The default value is false.
        Simply change it using QTextEdit::setTabChangesFocus(true).

        W Offline
        W Offline
        WhatIf
        wrote on last edited by
        #3

        @Joel-Bodenmann

        I designed the app using Qt designer. Where would be the best location to cal the setTabChangesFocus function?

        Joel BodenmannJ 1 Reply Last reply
        0
        • W WhatIf

          @Joel-Bodenmann

          I designed the app using Qt designer. Where would be the best location to cal the setTabChangesFocus function?

          Joel BodenmannJ Offline
          Joel BodenmannJ Offline
          Joel Bodenmann
          wrote on last edited by Joel Bodenmann
          #4

          Sorry, I can't help with that. I don't use the designer. One of the reasons why I don't use the designer is exactly that: Half the stuff you need to do in code anyway - at least it was like this the last time I used :)
          Note: That is purely my personal, subjective opinion. There are more than enough people around here who love using the designer. I'm sure someone one of those people will be happy to answer your question.

          Industrial process automation software: https://simulton.com
          Embedded Graphics & GUI library: https://ugfx.io

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            IIRC, that's a property so you should be able to set it in the property panel of the widget in designer.

            Otherwise you can do it in the constructor of your custom widget.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved