Qt例程之Settingviewcolornamedialog

The QSortFilterProxyModel class provides support for sorting and filtering data passed between another model and a view.
//在model和view之間提供支持爲排序和過濾數據

filterRegExp : QRegExp
This property holds the QRegExp used to filter the contents of the source model.
拿着QRegExp用來過濾源model的內容
void setFilterRegExp(const QString & pattern)

enum PatternSyntax { RegExp, RegExp2, Wildcard, WildcardUnix, FixedString, W3CXmlSchema11 }

PatternSyntax QRegExp::patternSyntax() const
Returns the syntax used by the regular expression. The default is QRegExp::RegExp.
//返回被regular expression使用的syntax

QRegExp::QRegExp(const QString & pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive, PatternSyntax syntax = RegExp)
Constructs a regular expression object for the given pattern string. The pattern must be given using wildcard notation
//爲給定的pattern string構造一個表達式,pattern必須使用通配符,
if syntax is Wildcard; the default is RegExp. The pattern is case sensitive, unless cs is Qt::CaseInsensitive. Matching is greedy (maximal)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章