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. Working with QTable Cellwidgets from keyboard
Forum Update on Monday, May 27th 2025

Working with QTable Cellwidgets from keyboard

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 2.8k Views
  • 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.
  • C Offline
    C Offline
    Crazy Sage
    wrote on 6 Oct 2010, 08:30 last edited by
    #1

    Hi all. Can anyone help me - is there any default way to move input focus onto and from cellWidgets (QLineEdits and QComboBoxes) by keyboard?

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on 6 Oct 2010, 10:44 last edited by
      #2

      @
      mywidget->setFocusPolicy(Qt::StrongFocus);
      @

      is this what you are looking for?

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Crazy Sage
        wrote on 6 Oct 2010, 11:37 last edited by
        #3

        No, not strong focus.

        I have table, in two columns there may be qlineedits or qcomboboxes. There are many rows and in most of them there are cellwidgets in those two columns.

        When I'm moving focus between cells in table by using keyboard arrows I don't know if there is any way to move focus from cell to cell widget that is placed into that cell. So even when I move to cell with QLineEdit I can't start editing it's contents from keyboard (or I don't know how to do it) and I can't go back to moving between cells by arrows (escape just closes form).

        Second problem is that when I start moving focus by pressing tab key it will move to first cell widget in first row of the table, to second, to last and then it will go back to first. I can't move focus by tabbing to cell widgets of second, third and all other rows, except for first and I can't move focus to other widget on that form, except for that cell widgets in first row of the table.

        1 Reply Last reply
        0

        1/3

        6 Oct 2010, 08:30

        • Login

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