Firstly Thanks for the replies...but I am still confused
As per the qt doc:
The simplest way to create a Q3IconView is to create a Q3IconView object and create some Q3IconViewItems with the Q3IconView as their parent, set the icon view's geometry and show it. For example:
Q3IconView *iv = new Q3IconView(this);
QDir dir(path, "*.xpm");
for (uint i = 0; i < dir.count(); i++)
{
(void) new Q3IconViewItem(iv, dir[i], QPixmap(path + dir[i]));
}
iv->resize(600, 400);
iv->show();
W.r.t to the above code could anyone pls explain the Constructor of Qdir as given...Is it:
QDir ( const QString & path,
const QString & nameFilter, SortFlags sort
= SortFlags
( Name | IgnoreCase
), Filters filters
= AllEntries
)
QDir ( const QString & path, const QString & nameFilter, SortFlags sort = SortFlags( Name | IgnoreCase ), Filters filters = AllEntries )
To copy to clipboard, switch view to plain text mode
...where the sortflags and filters are optional??
Also what is this code doing different from what I put forth before??
I intend to display the contents of "/homes/nupul/desktop" folder on the ListWidget exactly how my linux (SuSE 10) system would show it on the Desktop...with all the associated icons for the respective files.
Do i need to custom create my icons w.r.t the allowable Image formats supported by Qt4? Can't I use the Icons provided by the system? <-- how should i achieve the latter?
The QListWidgetItem Constructor is given as:
QListWidgetItem ( const QIcon & icon, const QString & text, QListWidget * parent = 0, int type = Type )
To copy to clipboard, switch view to plain text mode
what is the 'text' for? it's the text to be displayed below the icon, right? I want the file name to appear below the Icon...so what should I do?
what is the last int type=Type for and how does it affect the code???
Also could you please elaborate (in simple terms and NOT doc language) on the Use of QIconEngine...when/why should one use it?
Thanks
Nupul
Bookmarks