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 get the numbers which are created as row numbers when we create QTableWidget
Forum Updated to NodeBB v4.3 + New Features

How to get the numbers which are created as row numbers when we create QTableWidget

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 3.1k 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.
  • I Offline
    I Offline
    Indrajeet
    wrote on last edited by
    #1

    HI All

    Is it possible to get row numbers created automatically on left side in QTableWidget or QTable View.
    How to get it?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Please don't double-post your questions. You also asked this question in your topic about how to find out what row was selected.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Indrajeet
        wrote on last edited by
        #3

        ok Andre!!
        Actually i want to get the horizontalHeaderItem of QTableView?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          The header items of a view come from the model: "headerData":http://doc.qt.nokia.com/4.7/qabstractitemmodel.html#headerData

          If your model did not implement it, there is a default implementation, which can be seen in the Qt source code :-)

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            I am actually not sure what the default implementation for the headers is for QTableWidget. I tend to avoid that class :-)

            1 Reply Last reply
            0
            • I Offline
              I Offline
              Indrajeet
              wrote on last edited by
              #6

              Hi Andre

              How to add image file in post please tell so that i can add image to show what i want to read from QTableView.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                QtDevnet does not allow uploading of images. You will need to find some external host for your image data. I use my dropbox account, using the public folder to put those images, but there are many other image hosters available on the net.

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  rokemoon
                  wrote on last edited by
                  #8

                  [quote author="Rajveer" date="1320743912"]Hi Andre
                  How to add image file in post please tell so that i can add image to show what i want to read from QTableView.[/quote]
                  For example "postimage":http://postimage.org/
                  !http://postimage.org/image/4sumhxkgb/(stepashka)!

                  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