-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separated filebrowser and changed it to listwidget
- Loading branch information
1 parent
82f8f64
commit 13140ed
Showing
7 changed files
with
57 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "filebrowser.h" | ||
|
||
FileBrowser::FileBrowser(QWidget *parent) : QListWidget(parent) | ||
{ | ||
QDirModel dirmodel; | ||
QList<QFileInfo> list = QDir::current().entryInfoList(); | ||
while (!list.isEmpty()) | ||
{ | ||
QFileInfo fileinfo = list.takeFirst(); | ||
QIcon icon = dirmodel.iconProvider()->icon(fileinfo); | ||
QListWidgetItem *item = new QListWidgetItem(icon,fileinfo.fileName(),this); | ||
addItem(item); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef _FILEBROWSER_H | ||
#define _FILEBROWSER_H | ||
|
||
#include <QtGui> | ||
|
||
class FileBrowser : public QListWidget | ||
{ | ||
Q_OBJECT; | ||
public: | ||
FileBrowser(QWidget *parent=NULL); | ||
private: | ||
QString filter; | ||
}; | ||
|
||
#endif /* _FILEBROWSER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.