Results 1 to 3 of 3

Thread: sizeHint() called for invisible rows

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: sizeHint() called for invisible rows

    What values you used for "beginInsertRows()" and "endInsertRows()" ??

  2. #2
    Join Date
    Mar 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: sizeHint() called for invisible rows

    I have to add some additional information to answer that. If a message arrives it is stored in a list "m_msgList" which has nothing to do with my QT model. Triggered via a QTimer a method "updateMsgView()" is periodically triggered. This method moves all entries of "m_msgList" to the "m_tableViewList" that is used in the QT Model.
    The following code fragment shows the part where the messages are moved to the model list. Even when "m_msgList" contains just one message the sizeHint role of all rows in the model is called.

    Qt Code:
    1. void updateMsgView(){
    2. ...
    3. //append the msgList to the tableViewList
    4. iter = m_tableViewList.end();
    5. beginInsertRows(QModelIndex(),m_tableViewList.size(),m_tableViewList.size() + m_msgList.size() -1);
    6. m_tableViewList.splice(iter,m_msgList);
    7. endInsertRows();
    8.  
    9. emit signalScrollToBottom();
    10. }
    To copy to clipboard, switch view to plain text mode 


    Due to the fact that the content of the messages does not change it should be possible to resize them one time (at the time they are moved to the model).

Similar Threads

  1. Invisible characters
    By Myrgy in forum Qt Programming
    Replies: 0
    Last Post: 1st March 2010, 12:37
  2. QTableWidget sizeHint Not Called
    By mbrusati in forum Qt Programming
    Replies: 0
    Last Post: 27th September 2008, 14:53
  3. debug -> invisible program
    By sarefo in forum Qwt
    Replies: 3
    Last Post: 16th January 2008, 13:21
  4. set QwtPlotCurve invisible
    By gyre in forum Qwt
    Replies: 2
    Last Post: 19th December 2007, 07:53
  5. [qt3]invisible toolbar
    By lszk in forum Qt Programming
    Replies: 2
    Last Post: 26th February 2006, 18:34

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.