[Qt-interest] Howto dynamically update QListView's Items and Howto Insert/Read Datas ?

Aaron Lewis aaron.lewis1989 at gmail.com
Wed Mar 17 14:35:16 CET 2010


Hi,
    Right now , i'm using QListView like this:

-snip-
    QStringList listStr;

        while(...){
       ..
            listStr.append(tmp);
        ..
    }
    ui->listView->setModel(new QStringListModel(listStr));
-snip-

I have two questions , which i didn't found in the documents .. ;-(

I) How to dynamically update QListView ?
   I shouldn't need to use setModel to reset it everytime , right ?

II) How to read items / insert items ?
    For this one , i have totally no idea ..


Will appreciate your help ;-)

-- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode




More information about the Qt-interest-old mailing list