Results 1 to 3 of 3

Thread: Found a bad bug in QTableWidget!

  1. #1
    Join Date
    Aug 2009
    Posts
    92
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Found a bad bug in QTableWidget!

    Using a QTableWidget with the following properties:
    selectionMode: SingleSelection
    selectionBehaviour : SelectItems

    uname -a:
    Linux 2.6.32-34-generic #77-Ubuntu SMP Tue Sep 13 19:40:53 UTC 2011 i686 GNU/Linux
    Ubuntu 10.04

    In the itemSelectionChanged() slot I print the currentRow().

    Then I do the following:
    - click on a cell of the first row keeping the mouse button pressed - currentRow is 0 (OK)
    - move the mouse without releasing the button on the next row - currentRow is 0 (KO - should be 1)
    - move the mouse without releasing the button on the next row - currentRow is 1 (KO - should be 2)
    - move the mouse without releasing the button on the next row - currentRow is 2 (KO - should be 3)
    and so on...

    The first movement of the mouse, selecting the next row, doesn't update the currentRow.
    All the next movements increment the currentRow but it's not synchronized as it has lost one value in the first movement.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Found a bad bug in QTableWidget!

    Why do you think the current row should be changed when you are doing an extended or contiguous selection operation? A "current row" has no meaning when there are multiple rows selected.

    The initial row you clicked on is the current row and will probably remain the current row until you click somewhere else. In your selection changed slot, it is telling you that the selection has changed, not the current row.

  3. #3
    Join Date
    Aug 2009
    Posts
    92
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Found a bad bug in QTableWidget!

    4.8.3 and it's still there!

    @d_stranz: sorry I didn't reply, I forgot to subscribe to the thread (it should be the default choice).
    How is it possible that you don't see the bug ? have you tried to replicate it ?
    it's not only a bug for the developer but also for the final user!
    You click line 1 that is highlighted then, keeping pressed the mouse button, you move to line 2 and release the mouse.
    In the following tables, only the second line of the first table has 3 lines displayed in the second table (1, 2 and 3).
    This should be the correct result:

    19710174.png


    But this is what the user sees (wrong as line 2 has 3 entries on the second table):

    41583255.png


    Then, if the user clicks on the first line and moves the mouse (keeping the button pressed) till the 3rd line, this is what he sees (wrong as line 3 has no entries on the second table):

    veryko.png

Similar Threads

  1. Replies: 1
    Last Post: 6th January 2011, 04:19
  2. mingw10.dll not found
    By ctote in forum Qt Programming
    Replies: 1
    Last Post: 18th February 2010, 10:16
  3. I think I found a bug about QTableWidget. Is this a bug?
    By John Smith in forum Qt Programming
    Replies: 5
    Last Post: 2nd March 2009, 12:39
  4. I've found but how to use
    By Laser in forum Newbie
    Replies: 5
    Last Post: 11th August 2008, 13:52
  5. qt4.4.0 using windows, moc.exe not found
    By graubrust in forum Installation and Deployment
    Replies: 2
    Last Post: 9th July 2008, 09:35

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.