Customize sorting of QTreeWidget
来源:互联网 发布:拍网络电影怎么赚钱 编辑:程序博客网 时间:2024/06/05 07:26
http://stackoverflow.com/questions/788080/automatically-sorting-on-insert-in-qtreewidget
http://www.qtforum.org/article/25281/customize-sorting-of-qtreewidget.html#post89343
http://www.qtcentre.org/threads/11045-QTreeWidget-(Row-Check-Custom-Sort)
bool operator< (const QTreeWidgetItem &other) const; //custom sortbool QAppTreeItem::operator<(const QTreeWidgetItem &other) const{const QAppTreeWidget* Parent = dynamic_cast<const QAppTreeWidget*>(treeWidget());const QAppTreeItem* Right = dynamic_cast<const QAppTreeItem*>(&other);if ( Parent ){switch(Parent->sortColumn()){case QAppTreeWidget::COLUMN_IP_ADDRESS:return (IPAddr.toIPv4Address() < Right->IPAddr.toIPv4Address());break;}}return QTreeWidgetItem::operator<(other);}
Attached Files
- Code.zip (2.1 KB, 22 views)
- Customize sorting of QTreeWidget
- Customize the border of the control
- Customize the contextual menu of UIWebView
- QTreeWidget
- qtreewidget
- QTreeWidget
- QTreeWidget
- QTreeWidget
- QTreeWidget
- QTreeWidget
- Sorting Lists of Dictionaries
- A problem of sorting
- hdu5427A problem of sorting
- customize the template of new files in vs.net 2003
- Customize the default size of terminal in Ubuntu
- How to customize the background color of a UITableViewCell?
- [Salesforce] Sorting of SelectOption list
- HDU5429----A problem of sorting
- 一脚正式跨入了移动互联网时代
- Linux Mint12体验-如何使用sudo不输入密码
- 关于游戏测试方法(从51testing游戏测试中,选择摘录)
- PHP学习
- ORACLE归档模式的设置
- Customize sorting of QTreeWidget
- apache(单机)负载均衡配置(一)
- JavaScript Namespace
- Eclipse+Tomcat远程调试配置
- MyEclipse7.0 手动安装插件
- ASP.NET Master Page中的title
- 装饰器模式
- hoj 1372 方程的解数
- ICEfaces抄袭PrimeFaces