Results 1 to 2 of 2

Thread: customizing table widget

  1. #1
    Join Date
    Dec 2006
    Posts
    18
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default customizing table widget

    hi, our project requires customizing the table widget to get the required look.
    please find the picture EXISTING.jpeg to find the current layout. this has to be replicated using Qt.

    Our implementation went like this:
    1. Made the actual comment window, and row window using Qt desinger.(see pic NEW.jpeg)
    2. Made individual classes for both the ui files.
    3. add button click has to add a new row window class in above the existing row window pushing it down.
    4. Delete button press has to remove the lastes row window from the talbe widget.

    Our problem is we are unable to add the row class into the table widget, even when we using the method setCellWidget()

    also please find the code attached.

    expecting immediate help and thanking in advance.

    krishna.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: customizing table widget

    You have to create three separate widgets (one for each column) and then either use setCellWidget() to place widgets into columns (but in practice you won't be able to use the table widget in any way) or openPersistentEditor() to interconnect widgets with the model-view framework. If you choose the latter solution, first wrap your editor widgets into a delegate and set the delegate for the table.

Similar Threads

  1. make each row of table widget not editable??
    By darpan in forum Qt Programming
    Replies: 4
    Last Post: 16th October 2006, 10:22
  2. Replies: 11
    Last Post: 7th September 2006, 23:15
  3. Dynamic updates to a table widget
    By guiGuy in forum Qt Programming
    Replies: 6
    Last Post: 1st June 2006, 20:24
  4. displaying any table on a qdatatable
    By Philip_Anselmo in forum Newbie
    Replies: 4
    Last Post: 9th May 2006, 22:12
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.