hi
I would like create a files and diretoris view whith 5 columns.
how can i use QTreeWidget or QListWidget to do that ?
thanks
hi
I would like create a files and diretoris view whith 5 columns.
how can i use QTreeWidget or QListWidget to do that ?
thanks
Try using QDirModel and QTableView.
thanks
can i use QTreeWidget and QDirModel ?
No, you can't. What do you need QTreeWidget for? You can use QTreeView instead of the table view if you want.
i will use it in a ftp client, to view a local and server files ...
so i need a name, path and many informations of treewidget items to use with Qftp class
thanks
If i use for exampl a mouse event, how can i identify which item on the treeview is clicked ?
for exampl on QTreeWidget i can use my class
Qt Code:
To copy to clipboard, switch view to plain text modehow can i use like this on QTreeViewQt Code:
signals: //...... { emit itemClicked(selectedItem); }To copy to clipboard, switch view to plain text mode
thank you
Dear all,
I am using QTableView with QDirModel to display the local file system.
I have set the filter with "QDir::AllEntries". it is displaying all folders and Files including "." and ".." items.
If I use QDir::NoDotAndDotDot, both "." and ".." is filtered.
I need only ".." but not "."
can anyone suggest me the way of doing this.
Thanks in advance.
Apply a sort filter proxy model that will filter out the single dot.
jay (28th August 2008)
Dear all,
I have used QSortFilterProxyModel as per wysota's suggestion. its working fine. thanks for this.
can anyone help me with regular expression that should display only ".." not "."
proxyModel->setFilterRegExp ( QRegExp ( "......." ) );
proxyModel->setFilterKeyColumn ( 0 );
thanks in advance.
Am not sure butie. Anything except '.'"[^\.]"
Also have a look at QRegExp
thanks for your reply.
I have checked with this, but it filters both ".." and "."
my requirement is only ".."
You can subclass the proxy and reimplement its filterAcceptsRow() method.
It seems like an old article....
But I have the same question about how to show files and directory of ftp.....
I choose QTreeView and QDirModel.....
What should I specify the parameters when I call QTreeView::setRootIndex() ??
Thanks.
QDirModel can't be used with FTP.
Bookmarks