Results 1 to 3 of 3

Thread: doubt in animation demo "stickman"

  1. #1
    Join Date
    Apr 2011
    Posts
    36
    Thanks
    3
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default doubt in animation demo "stickman"

    hi,

    i have a doubt in stickman demo project.

    anyone please clear
    Qt Code:
    1. Animation animation;
    2. {
    3. QFile file(animationFileName);
    4. if (file.open(QIODevice::ReadOnly))
    5. animation.load(&file);
    6. }
    7.  
    8. const int frameCount = animation.totalFrames();
    To copy to clipboard, switch view to plain text mode 

    in this code,animation file name is "dead" with "file" ext.what does file contains?
    what it returns while loading?

    please clear my doubt.
    thanks in advance.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: doubt in animation demo "stickman"

    it returns Frames when loaded (in fact it returns whatever is saved using Animaton::save()), have look at these functions implementation

    Qt Code:
    1. void Animation::save(QIODevice *device) const;
    2. void Animation::load(QIODevice *device);
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Apr 2011
    Posts
    36
    Thanks
    3
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: doubt in animation demo "stickman"

    thanks for reply


    Added after 56 minutes:


    hi,

    where animation.save() is called in stickman porject
    Last edited by hema; 13th July 2011 at 05:16.

Similar Threads

  1. Replies: 1
    Last Post: 7th April 2010, 21:46
  2. Replies: 3
    Last Post: 15th February 2010, 17:27
  3. Replies: 3
    Last Post: 8th July 2008, 19:37
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 15:58

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.