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. [SOLVED] QTableWidget: how to autoselect the near row?
QtWS25 Last Chance

[SOLVED] QTableWidget: how to autoselect the near row?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 1 Posters 903 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.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

    Hi, I like to know how to make the near row autoselected after deleting an other row that can be the latest one or the first one on a QTableWidget?
    thanks.

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

      What did you try already? When you delete a row, I assume you know the row number right? You can just store that row number, delete the row, and then select the row that after deletion has that same row number, or the last row if there no longer is a row with the given row number.

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        is there any possible method by using the designer QListWidget proprietaries.

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

          No. The designer is for visual design, not for coding your application. You actually have to write a couple of lines of C++ (or javascript code, nowadays) once in awhile to make a working application out of your interface designs.

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #5

            ok, i understand now, thanks. all right.

            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