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. double click in tablewidget is working only on 1st column
Qt 6.11 is out! See what's new in the release blog

double click in tablewidget is working only on 1st column

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.2k Views 1 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.
  • S Offline
    S Offline
    saber
    wrote on last edited by
    #1

    i made a qtablewidget list with 3 column
    problem is item click is working when i double clicked in first column .
    it is not a custom qtablewidget.

    0_1524837162260_y.png

    0_1524837179374_a.png

    0_1524837197047_b.png

    RatzzR 1 Reply Last reply
    0
    • S saber

      i made a qtablewidget list with 3 column
      problem is item click is working when i double clicked in first column .
      it is not a custom qtablewidget.

      0_1524837162260_y.png

      0_1524837179374_a.png

      0_1524837197047_b.png

      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by Ratzz
      #2

      @saber
      Its because u used index of first column ?

      --Alles ist gut.

      1 Reply Last reply
      3
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        as @Ratzz says, you used the value 1 as fixed value in the
        item(item->row,1)
        so even if it sends signal correctly, you might grab the wrong data.

        S 1 Reply Last reply
        2
        • mrjjM mrjj

          Hi
          as @Ratzz says, you used the value 1 as fixed value in the
          item(item->row,1)
          so even if it sends signal correctly, you might grab the wrong data.

          S Offline
          S Offline
          saber
          wrote on last edited by
          #4

          @mrjj so what should i do toget the first column data with selecting row?

          mrjjM 1 Reply Last reply
          0
          • S saber

            @mrjj so what should i do toget the first column data with selecting row?

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #5

            @saber
            You mean the item given is not the one u want ?
            You want the clicked items text and the text from first col?

            Anyway, there is also
            http://doc.qt.io/qt-5/qtablewidgetitem.html#column
            (just like row)

            Anyway, maybe in your case all you need is 0 (zero) and not 1.

            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