文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>过滤模型尽量不要用正规表达式

过滤模型尽量不要用正规表达式

时间:2009-06-21  来源:feiyinglinux

  • void setFilterRegExp ( const QRegExp & regExp )
  • void setFilterRegExp ( const QString & pattern )

以上是两个基于正规表达式的过滤,如果有特殊字符,可能会出问题。

如过滤的内容是tr("abc."),   . 在正则表过式里,代表通配符,这样,就会把所有前面三个字符是abc的项目都显示出来。

 

建议用下面的这个函数

void QSortFilterProxyModel::setFilterFixedString ( const QString & pattern )   [slot]

Sets the fixed string used to filter the contents of the source model to the given pattern.

 

 

相关阅读 更多 +
排行榜 更多 +
空中跑酷汉化版

空中跑酷汉化版

赛车竞速 下载
修仙传说

修仙传说

角色扮演 下载
魔界零之迷宫

魔界零之迷宫

冒险解谜 下载