Results 1 to 5 of 5

Thread: items in view would disappear on scrolling

  1. #1
    Join Date
    Apr 2008
    Location
    Karaj,Iran
    Posts
    43
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default items in view would disappear on scrolling

    I add a QTableView as a tab for QTabWidget using addTab method,when not scrolling is needed everything is fine but as soon as page scrolls some items would disappear,what should i do?(does it have anything to do with repainting the items in the view ?)
    for getting the picture more clearly,take a loot at these

    with no scrolling:

    with scrolling:
    ---
    A situtation never gets so complicated that it can't get any more complicated!

  2. #2
    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: items in view would disappear on scrolling

    How are you populating the tableview ?

  3. #3
    Join Date
    Apr 2008
    Location
    Karaj,Iran
    Posts
    43
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: items in view would disappear on scrolling

    using data function of the model,the data function uses a qsqlquery to retrive data(because of some bugs in sqlModel of qt i coded the model myself)
    ---
    A situtation never gets so complicated that it can't get any more complicated!

  4. #4
    Join Date
    May 2008
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: items in view would disappear on scrolling

    Do you use WinXP or Vista?
    If have a similar problem which occurs only with Qt 4.5.0 and Windows Vista...

  5. #5
    Join Date
    Apr 2008
    Location
    Karaj,Iran
    Posts
    43
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: items in view would disappear on scrolling

    I'm using windows XP,
    I just used another simple model to check whether my model is the problem or not
    Qt Code:
    1. model=new QStandardItemModel (4, 4);
    2. for (int row = 0; row < 4; ++row) {
    3. for (int column = 0; column < 4; ++column) {
    4. QStandardItem *item = new QStandardItem(QString("row %0, column %1").arg(row).arg(column));
    5. model->setItem(row, column, item);
    6. }
    7. }
    To copy to clipboard, switch view to plain text mode 
    it still has the problem,seemingly sth is wrong with QTabWidget,what am I missing? I also used to show my view using show method and all items are showing while scrolling and works just fine.it's very critical which I get over this,any ideas?
    Last edited by sepehr; 21st March 2009 at 07:25.
    ---
    A situtation never gets so complicated that it can't get any more complicated!

Similar Threads

  1. QTableWidget: set items disappear after new insertion
    By Raccoon29 in forum Qt Programming
    Replies: 6
    Last Post: 16th March 2008, 18:28
  2. multiple selection of list view items
    By samirg in forum Qt Programming
    Replies: 2
    Last Post: 30th October 2007, 19:05
  3. Replies: 4
    Last Post: 25th April 2007, 16:54
  4. How to restrict graphic items in view
    By aamer4yu in forum Qt Programming
    Replies: 4
    Last Post: 13th November 2006, 07:46
  5. Drag and drop items in view to sort order
    By Big Duck in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 19:43

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.