Results 1 to 3 of 3

Thread: how to reset the pointer at begining??

  1. #1
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to reset the pointer at begining??

    am having file which contains list of images sorted by linux
    eg:
    5.jpeg
    4.jpeg
    3.jpeg
    2.jpeg
    1.jpeg
    here am reading each line and displaying image in widget when my list at end i want to read again first line.
    how can i make to read first line again
    can any one give me suggestion for this

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to reset the pointer at begining??

    Some pseudo code :
    Qt Code:
    1. if( file.atEnd() )
    2. file.seek(0);
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to Lesiok for this useful post:

    iswaryasenthilkumar (4th February 2015)

  4. #3
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to reset the pointer at begining??

    Thank you its working
    Quote Originally Posted by Lesiok View Post
    Some pseudo code :
    Qt Code:
    1. if( file.atEnd() )
    2. file.seek(0);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QDockWidget -> Reset all
    By pl01 in forum Qt Programming
    Replies: 2
    Last Post: 24th March 2011, 12:11
  2. Replies: 1
    Last Post: 4th December 2010, 17:20
  3. Replies: 1
    Last Post: 9th February 2010, 12:11
  4. reset QwtPlot
    By sarefo in forum Qwt
    Replies: 1
    Last Post: 24th January 2008, 08:00

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
  •  
Qt is a trademark of The Qt Company.