Results 1 to 2 of 2

Thread: Flag storing

  1. #1
    Join Date
    May 2009
    Posts
    94
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Post Flag storing

    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.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Flag storing

    You can use object of that enum.
    Like QTextDocument::FindFlags myFlags;
    myFlags = QTextDocument::FindBackward | QTextDocument::FindCaseSensitively;
    You can then use myFlags wherever you want

Similar Threads

  1. Replies: 0
    Last Post: 20th May 2009, 10:01
  2. Storing filenames in QString: a bad idea?
    By drhex in forum Qt Programming
    Replies: 4
    Last Post: 25th August 2008, 22:21
  3. Tristate Flag ignored in QListWidgetItem
    By ghoust26 in forum Qt Programming
    Replies: 0
    Last Post: 16th April 2008, 08:21
  4. Replies: 3
    Last Post: 13th November 2007, 10:30
  5. how to set WDestructiveClose Flag
    By amitkhanna in forum Newbie
    Replies: 4
    Last Post: 17th June 2007, 16:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.