Results 1 to 3 of 3

Thread: Moving whole rows between 3 different QTableWidgets after pressing buttons

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    9
    Thanks
    1

    Lightbulb Moving whole rows between 3 different QTableWidgets after pressing buttons

    Hi,
    I want to ask you about the best way to implement moving whole rows between 3 different QTableWidgets after pressing buttons or when I get such a datagram from server.
    This is how it looks like now:
    tableWidgets..jpg
    I have QMap<int, Player *> to store id and pointers of Player class where there are fields like: QString nick, quint8 team_id,...
    When I press one of these join buttons I need to change team_id field of player who clicked it to 0 (Spectators), 1 (Home Team) or 2 (Away Team) and move the whole row with his id to proper QTableWidget. The same with information about other players changing their teams.

    What do you think will be the best solution for this problem?
    Last edited by And_re; 11th May 2010 at 14:57.

Similar Threads

  1. Replies: 4
    Last Post: 26th October 2009, 22:25
  2. Switching/moving rows in a model
    By gri in forum Qt Programming
    Replies: 4
    Last Post: 17th December 2008, 11:21
  3. Dialog closes on pressing Esc key?
    By vishal.chauhan in forum Qt Programming
    Replies: 6
    Last Post: 3rd July 2008, 08:53
  4. closing of window on pressing ESC key
    By raghvendramisra in forum Newbie
    Replies: 2
    Last Post: 7th January 2008, 02:36
  5. QTableWidgets problems with columns
    By 3nc31 in forum Qt Programming
    Replies: 1
    Last Post: 24th October 2007, 08:47

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.