Results 1 to 2 of 2

Thread: How to QTableWidget default values on insertion?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to QTableWidget default values on insertion?

    Hi all!

    I'm trying to make some tables where some fields have a default value.
    When a new record is inserted into these fields, they should be filled with their default values.

    I am having difficulty doing that. I have several different tables, all inherits some methods of a base baseclass (modified QTableWidget), such as keyEvents.
    In these events I use the function for inserting rows. So I could not just put the defaults after.

    Is there any method that can be re-implemented to run every time a new row is inserted? Or should I do otherwise?
    I thinked about... I can make a virtual method in the baseclass and call it after the row insertion, then re-implement in the child class. Is this a better way?

    Sorry, for my bad english!

    If needed, I can post the code here.

    Thx!
    Last edited by RawArkanis; 20th April 2010 at 02:42.

Similar Threads

  1. Replies: 0
    Last Post: 9th March 2010, 13:02
  2. QTable Widget
    By kavinsiva in forum Newbie
    Replies: 5
    Last Post: 23rd October 2009, 13:50
  3. Replies: 4
    Last Post: 3rd May 2009, 18:32
  4. C++ and default values for functions
    By guestgulkan in forum General Programming
    Replies: 4
    Last Post: 2nd January 2007, 22:53

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.