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. Moving through images in image viewer example
Forum Updated to NodeBB v4.3 + New Features

Moving through images in image viewer example

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.5k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    thescouse
    wrote on 12 Oct 2013, 11:43 last edited by
    #1

    Hi everyone.
    I am really new to Qt and am still in early learning phase.
    I am trying to learn through the documentations given alongwith the software.
    Currently I am working in the image viewer example given with the SDK.
    I want to add some functions in the program.
    So, here’s what I am looking for-
    I opened an image in the window. Now I want to move through the folder i.e. create 2 new Acts of previous and next in the view menu. So, can anyone guide me through the task as in tell me step by step and referring to the same example preferably, about how to program the given functions.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thescouse
      wrote on 13 Oct 2013, 02:51 last edited by
      #2

      Can anyone help me in anyway?!?

      1 Reply Last reply
      0
      • P Offline
        P Offline
        p3c0
        Moderators
        wrote on 13 Oct 2013, 04:09 last edited by
        #3

        Hi,

        If you refer the code you can see how they create the Actions and add them to the Menu. Similarly you have to create 2 actions you require and add them to the Menu.

        Then connect these two Actions to a slot so that they are called when the actions are triggered.

        Now to display the images as per the actions, first get all absolute paths of the images from a folder(Iterate over that folder using QDir) and store it in QStringList and then just access the items ( using QStringList::at(int i) ) of this QStringList as per the Actions performed (i.e increment or decrement i).

        Then once you get the current fullpath of the image just display it

        Hope this helps.

        157

        1 Reply Last reply
        0
        • T Offline
          T Offline
          thescouse
          wrote on 13 Oct 2013, 06:05 last edited by
          #4

          Thanks a lot, I will check this out. (Y) :)

          1 Reply Last reply
          0
          • T Offline
            T Offline
            thescouse
            wrote on 17 Oct 2013, 05:54 last edited by
            #5

            Can u please give a pseudo program for this.

            1 Reply Last reply
            0

            5/5

            17 Oct 2013, 05:54

            • Login

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