Results 1 to 2 of 2

Thread: Switching between models

  1. #1
    Join Date
    Feb 2010
    Location
    Wokingham, United Kingdom
    Posts
    36
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Switching between models

    Maybe a dumb question but I have to ask....

    Using the model/view framework can I switch a view's model on the fly?
    And how might one go about it?

    cheers in advance

    janorcutt

  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: Switching between models

    Just set a new model using QAbstractItemView::setModel().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    janorcutt (24th January 2012)

Similar Threads

  1. Qt Creator Switching between .ui and .h/.cpp (and help)
    By CoderMan in forum Qt Tools
    Replies: 3
    Last Post: 15th August 2011, 07:05
  2. sql models
    By damiano19902 in forum Newbie
    Replies: 1
    Last Post: 4th June 2009, 07:18
  3. Switching 5.2 from 5.0.2
    By baray98 in forum Qwt
    Replies: 1
    Last Post: 11th May 2009, 17:59
  4. Proxy models and slection models
    By amunitz in forum The Model-View Framework
    Replies: 1
    Last Post: 23rd September 2008, 14:35
  5. switching between pages
    By Kapil in forum Newbie
    Replies: 9
    Last Post: 6th March 2006, 10:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.