Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Adding 'Next' and 'Previous' functionality to search engine
QtWS25 Last Chance

Adding 'Next' and 'Previous' functionality to search engine

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amban
    wrote on last edited by
    #1

    Hi,
    Following this example here http://doc.qt.nokia.com/main-snapshot/uitools-textfinder.html to find matching strings. Now I have added a 'Next' and 'Previous' button to choose one searched result at a time. Can anyone point out Qt code to achieve this. I am not sure how to proceed.

    Thanks

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Probably you should elaborate a little more what you are trying to achieve.
      The textfinder example is pretty obvious, but that is apparently not your question.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        amban
        wrote on last edited by
        #3

        Hi,
        What i want to achieve is that once all the searched strings have been highlighted (as in textfinder example), I want to use keys 'p' and 'n' to browse through the selected strings . Something like using 'n' key to browse through results in vi grep command.

        Thanks

        1 Reply Last reply
        0
        • A Offline
          A Offline
          amban
          wrote on last edited by
          #4

          Hi, I have not been able to find the solution. Any help is appreciated.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            Did you try adding a [[Doc:QAction]] with a shortcut and connect that to a slot?

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • A Offline
              A Offline
              amban
              wrote on last edited by
              #6

              I have edited the title...any help ?

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on last edited by
                #7

                [quote author="Volker" date="1309441186"]Did you try adding a [[Doc:QAction]] with a shortcut and connect that to a slot?[/quote]

                This is the solution. Add two new buttons, connect them to slots and to the same as in find, only that you use the current cursor position as start position.

                Nokia Certified Qt Specialist.
                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved