lovehouye
12th February 2009, 02:17
Hi everyone,
I have rewrite the QDirModel by myslef. I want to add a column to show some images.
In the QDirModel, there is only 'Name', 'Size', 'Type', 'Date Modified'. And all of them are QString type.
QString name(const QModelIndex &index) const;
QString size(const QModelIndex &index) const;
QString type(const QModelIndex &index) const;
QString time(const QModelIndex &index) const;
case 0: return d->name(index);
case 1: return d->size(index);
case 2: return d->type(index);
case 3: return d->time(index);
So, I want to know what type can I set that it can show the images in the additional column. I have tried 'QPixmap' and 'QIcon', but they are not work.
What can I do? I need your help. Thanks.
I have rewrite the QDirModel by myslef. I want to add a column to show some images.
In the QDirModel, there is only 'Name', 'Size', 'Type', 'Date Modified'. And all of them are QString type.
QString name(const QModelIndex &index) const;
QString size(const QModelIndex &index) const;
QString type(const QModelIndex &index) const;
QString time(const QModelIndex &index) const;
case 0: return d->name(index);
case 1: return d->size(index);
case 2: return d->type(index);
case 3: return d->time(index);
So, I want to know what type can I set that it can show the images in the additional column. I have tried 'QPixmap' and 'QIcon', but they are not work.
What can I do? I need your help. Thanks.