Results 1 to 5 of 5

Thread: few table issues

  1. #1
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question few table issues

    I use subclassed QAbstractTableModel for QTableView. The issues are:

    1. It's may be funny, I have not found a way to change (all) rows heights.

    2. One of the columns is editable. Editing itself works fine:
    - I double-click a cell,
    - input new text,
    - hit Enter.

    New information is saved in my container which is used for data() (moreover,
    changings are successfully saved to persistent storage - XML-file in my case),
    dataChanged(index, index) is emited. But, in spite of emitting the signal, the
    view doesn't update just edited cell.

    3. How to force a cell editor to use current cell data as starting point for edit?
    Last edited by anli; 5th August 2006 at 19:18.

  2. #2
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: few table issues

    I have resolved the 3d issue via setting own item delegate (based on QLineEdit).

    To dig in the 2d problem (cell contents doesn't update) I have overloaded dataChanged() QTableView's slot to be sure an appropriate signal is received.

    It's received, but cell contents isn't updated.

    ??

  3. #3
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: few table issues

    Aha,

    I have found the 2d issue reason, it was my incorrect use of Qt-containers. So, only one question is unanswered now:

    How to set table row heights (all at once)?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: few table issues

    Quote Originally Posted by anli
    How to set table row heights (all at once)?
    You can try to reimplement QHeaderView::sectionSizeFromContents().

  5. The following user says thank you to jacek for this useful post:

    anli (6th August 2006)

  6. #5
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: few table issues

    Quote Originally Posted by jacek
    You can try to reimplement QHeaderView::sectionSizeFromContents().
    Thanks, I'll try and report :-)

Similar Threads

  1. Dynamic updates to a table widget
    By guiGuy in forum Qt Programming
    Replies: 6
    Last Post: 1st June 2006, 20:24
  2. displaying any table on a qdatatable
    By Philip_Anselmo in forum Newbie
    Replies: 4
    Last Post: 9th May 2006, 22:12
  3. creating table plugin
    By mgurbuz in forum Qt Programming
    Replies: 3
    Last Post: 28th April 2006, 13:50
  4. Adding row in a Table after selected row
    By ankurjain in forum Qt Programming
    Replies: 3
    Last Post: 20th April 2006, 18:06
  5. Table model / view editing issue
    By Caius Aérobus in forum Qt Programming
    Replies: 9
    Last Post: 7th April 2006, 11:03

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.