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. QStyledItemDelegate
QtWS25 Last Chance

QStyledItemDelegate

Scheduled Pinned Locked Moved Unsolved General and Desktop
qstyleditemdeleclick edit
5 Posts 2 Posters 538 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
    charry
    wrote on last edited by
    #1

    The four Column is use QStyledItemDelegate, but when first Click on The cell for four Column,The selected is the cell, can select the cell the editor is edited state?

    4ec03483-0403-4eb9-bac6-00c09c93eecd-image.png

    JonBJ 1 Reply Last reply
    0
    • C charry

      The four Column is use QStyledItemDelegate, but when first Click on The cell for four Column,The selected is the cell, can select the cell the editor is edited state?

      4ec03483-0403-4eb9-bac6-00c09c93eecd-image.png

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @charry
      Hi and welcome.

      I think I understand the first part of your sentence: "All 4, or at least the 4th column, use QStyledItemDelegate. When I first click on the cell for the 4th column, that becomes the selected cell." Right?

      But what does

      can select the cell the editor is edited state?

      mean? We know English is not the native language of many of our members, but can you try to clarify?

      C 1 Reply Last reply
      0
      • C Offline
        C Offline
        charry
        wrote on last edited by
        #3

        When I click on the fourth column of the table, the first click selects the cell, and I need to click once to select the edit box. It means that I need to click twice when to edit. (The fourth column is implemented by QStyledItemDelegate), sorry, that you can’t understand.

        JonBJ 1 Reply Last reply
        0
        • C charry

          When I click on the fourth column of the table, the first click selects the cell, and I need to click once to select the edit box. It means that I need to click twice when to edit. (The fourth column is implemented by QStyledItemDelegate), sorry, that you can’t understand.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @charry
          Yes, you are normally supposed to double-click to edit a cell (one click to select the cell, double-click to edit the cell).

          If you want single-click to edit, you should look at, say, QTableView::setEditTriggers(QAbstractItemView::AllEditTriggers). See if one of those values do what you want? If not, have a read through e.g. https://stackoverflow.com/questions/18831242/qt-start-editing-of-cell-after-one-click, there are other possibilities there. Or further hits via Google qtableview click edit.

          1 Reply Last reply
          3
          • JonBJ JonB

            @charry
            Hi and welcome.

            I think I understand the first part of your sentence: "All 4, or at least the 4th column, use QStyledItemDelegate. When I first click on the cell for the 4th column, that becomes the selected cell." Right?

            But what does

            can select the cell the editor is edited state?

            mean? We know English is not the native language of many of our members, but can you try to clarify?

            C Offline
            C Offline
            charry
            wrote on last edited by
            #5
            This post is deleted!
            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