Results 1 to 8 of 8

Thread: QT creator

  1. #1
    Join Date
    Jun 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QT creator

    How can i create a pointer with QPIxmap so that it can read images from a folder after passing an index value to it?
    Any help would be greatly acknowledged.

  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: QT creator

    How can i create a pointer with QPIxmap so that it can read images from a folder after passing an index value to it?
    Can u elaborate what index means ?

    Also go through the Qt Demos.. you will find something useful ( Image Viewer example)

  3. #3
    Join Date
    Jun 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT creator

    I have to make an application so that on moving a slider it would pass an index value to graphicsview so that it can display the corresponding image file where images are stored in a directory.How can i make such a pointer that will be auto updated by changing its file location and setting address for pixmap?

  4. #4
    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: QT creator

    You will have to code yourself..
    First mainatin all the image files in the directory in a list..
    Set the range of slider based on the size of list..

    Now when the slider value changes, fetch the value of slider, fetch the filename with given index from the list, and display the image in graphics view or wherever u want.
    Hope making image from filename is not a tough job..

  5. #5
    Join Date
    Jun 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT creator

    could you please tell me how to fetch filename with given index from list? I m stuck at this point.

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT creator

    Have a look at QList & QVector - store your filenames there.

  7. #7
    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: QT creator

    If you are using QStringList to store filenames, use list.at(index) .
    Please give some time studying classes.

  8. #8
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT creator

    I'd be suprised if [] isn't overloaded too.

Similar Threads

  1. Qt Creator
    By Baracardi in forum Qt Tools
    Replies: 5
    Last Post: 28th May 2010, 14:43
  2. QT Creator
    By vinod sharma in forum Qt Tools
    Replies: 2
    Last Post: 22nd January 2010, 08:34
  3. QT creator - best IDE.
    By megabyte-ceercop in forum Qt Tools
    Replies: 1
    Last Post: 12th April 2009, 09:01
  4. Qt Creator
    By fnmblot in forum General Discussion
    Replies: 3
    Last Post: 12th April 2009, 08:06
  5. Qt Creator on Mac OS X
    By stephenju in forum Qt Tools
    Replies: 2
    Last Post: 12th March 2009, 21:51

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.