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. how to pass the focus to next widget
Qt 6.11 is out! See what's new in the release blog

how to pass the focus to next widget

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 587 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.
  • E Offline
    E Offline
    emazed
    wrote on last edited by
    #1

    Hello,
    i have a list of QLineEdit items. Is it possible to pass the focus to the next widget, as soon i finished edit one QlineEdit??
    for example: i select 1st QlineEdit, edit text, and i press enter. Then the signal editingFinished() is called, and i perform my checks onto the text inserted. Then i have to press the "Tab" Key click with mouse to select the next item, what i want is a simple way to auto-pass the focus to the next QLineEdit, in the same way if i were pressing Tab.
    Is there a simple way to do it?
    I tryied the "focusNextChild()" method on main widget, but it does not work very well,
    can you suggest something better?

    Kind Regards,
    emazed

    M 1 Reply Last reply
    0
    • E emazed

      Hello,
      i have a list of QLineEdit items. Is it possible to pass the focus to the next widget, as soon i finished edit one QlineEdit??
      for example: i select 1st QlineEdit, edit text, and i press enter. Then the signal editingFinished() is called, and i perform my checks onto the text inserted. Then i have to press the "Tab" Key click with mouse to select the next item, what i want is a simple way to auto-pass the focus to the next QLineEdit, in the same way if i were pressing Tab.
      Is there a simple way to do it?
      I tryied the "focusNextChild()" method on main widget, but it does not work very well,
      can you suggest something better?

      Kind Regards,
      emazed

      M Offline
      M Offline
      mpergand
      wrote on last edited by
      #2

      @emazed
      Hi,

      Look here

      E 1 Reply Last reply
      1
      • M mpergand

        @emazed
        Hi,

        Look here

        E Offline
        E Offline
        emazed
        wrote on last edited by
        #3

        @mpergand i got it, ty!

        1 Reply Last reply
        0

        • Login

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