PDA

View Full Version : Flag storing



bismitapadhy
24th June 2009, 06:16
QTextCursor QTextDocument::find ( const QString & subString, const QTextCursor & cursor, FindFlags options = 0 ) const
FindFlags option indiacate -
enum QTextDocument::FindFlag
flags QTextDocument::FindFlags
This enum describes the options available to QTextDocument's find function. The options can be OR-red together from the following list:

Constant Value

QTextDocument::FindBackward 0x00001
QTextDocument::FindCaseSensitively 0x00002
QTextDocument::FindWholeWords 0x00004
Makes find match only complete words.

The FindFlags type is a typedef for QFlags<FindFlag>. It stores an OR combination of FindFlag values.

how can i store find flag so that i can use it later. i want to store only QTextDocument::FindBackward or combination of two like
QTextDocument::FindBackward | QTextDocument::FindCaseSensitively.

aamer4yu
24th June 2009, 06:26
You can use object of that enum.
Like QTextDocument::FindFlags myFlags;
myFlags = QTextDocument::FindBackward | QTextDocument::FindCaseSensitively;
You can then use myFlags wherever you want