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

QStyledItemDelegate

Scheduled Pinned Locked Moved Unsolved General and Desktop
qstyleditemdeleclick edit
5 Posts 2 Posters 540 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 29 Oct 2020, 07:12 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

    J 1 Reply Last reply 29 Oct 2020, 07:29
    0
    • C charry
      29 Oct 2020, 07:12

      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

      J Offline
      J Offline
      JonB
      wrote on 29 Oct 2020, 07:29 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 29 Oct 2020, 08:07
      0
      • C Offline
        C Offline
        charry
        wrote on 29 Oct 2020, 07:38 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.

        J 1 Reply Last reply 29 Oct 2020, 08:05
        0
        • C charry
          29 Oct 2020, 07:38

          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.

          J Offline
          J Offline
          JonB
          wrote on 29 Oct 2020, 08:05 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
          • J JonB
            29 Oct 2020, 07:29

            @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 29 Oct 2020, 08:07 last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0

            3/5

            29 Oct 2020, 07:38

            • Login

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