Results 1 to 2 of 2

Thread: Refresh tableView in TabWidget

  1. #1
    Join Date
    Jan 2011
    Posts
    17
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Refresh tableView in TabWidget

    Hello.
    I have a QTableView nested in one of the QTabWidget.
    My problem is that after opening the tab with QTableView not all of the data is visible - there is place for 5 rows, but visible are only 2. All rows show up only after resizing window. I tried to map signal currentChanged(int) from QTabWidget to doItemsLayout() slot of QTableView, but without success - it is emitted too soon. Mapping QTableView's clicked(QModelIndex) to doItemsLayout() works, but I do want it to be reloaded just after opening the tab, not after the user's interaction. How can I achieve this?

  2. #2
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Refresh tableView in TabWidget

    You can derive your class from QTableView and override it's showEvent & call your lay out change there.

Similar Threads

  1. Listwidget->tabwidget->tableview signal to activate
    By scott_hollen in forum Newbie
    Replies: 8
    Last Post: 28th March 2011, 18:33
  2. Replies: 2
    Last Post: 14th January 2011, 15:09
  3. WebView and tabWidget
    By maston in forum Qt Programming
    Replies: 1
    Last Post: 21st October 2010, 15:31
  4. Add tab to tabwidget thru Designer.
    By phillip_Qt in forum Qt Programming
    Replies: 2
    Last Post: 13th January 2010, 11:00
  5. TabWidget
    By Salazaar in forum Newbie
    Replies: 5
    Last Post: 17th May 2007, 21:07

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.