Results 1 to 15 of 15

Thread: QTableWidget + setCellWidget facing problem.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 268 Times in 268 Posts
    Wiki edits
    20

    Default Re: QTableWidget + setCellWidget facing problem.

    If the goal is to use the model in more than one view, then do not use a QTableWidget but a QTableView. The model always maintains the indexes. The view might keep a list of indexes to store view specific parameters (like expanded items), but if the view wants to change an item, it needs to tell the model about it.

    The description of qVariantFromValue:
    http://doc.qt.nokia.com/4.7/qvariant...riantFromValue

  2. #2
    Join Date
    Oct 2010
    Posts
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QTableWidget + setCellWidget facing problem.

    Hi,

    Thanks for replying,

    I have few questions to ask about Delegates....

    Earlier i was populating my tablewidget using SetItem(i, j, newItem) and Now(using Delegates) Do i need to Change the way i was populating my tablewidget???
    if so, then how???

    In createEditor function i have dynamically created a custom widget in which i have added one LineEdit and ComboBox in a widget, but when executing it..... the LineEdit and ComboBox size is too small.....

    Thanks!!!!!!

  3. #3
    Join Date
    Oct 2010
    Posts
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QTableWidget + setCellWidget facing problem.

    Hi,

    I am still not getting the proper size of a custom widget in a cell. Its small and when i click to edit that cell, the background value is shown in the parent widget here is a screenshot of a single widget..widget.jpg Can anyone help me??

    How can i resize it, so that i will fit properly in a cell....

    Thanks!!!!!
    Last edited by prin; 19th October 2010 at 11:51.

  4. #4
    Join Date
    Oct 2010
    Posts
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QTableWidget + setCellWidget facing problem.

    Hey, Thanks all for replying to some of my threads...... My problem is solved......

Similar Threads

  1. Replies: 7
    Last Post: 18th September 2009, 11:59
  2. I am facing a problem please help me !
    By sujan.dasmahapatra in forum General Programming
    Replies: 3
    Last Post: 16th September 2009, 15:12
  3. i am facing a problem with QTextEdit!!!
    By mismael85 in forum Qt Programming
    Replies: 9
    Last Post: 10th March 2008, 19:06
  4. Replies: 10
    Last Post: 9th July 2007, 23:02
  5. Facing problem with qt-4.1 designer
    By jnana in forum Qt Tools
    Replies: 4
    Last Post: 8th March 2006, 19: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
  •  
Qt is a trademark of The Qt Company.