Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Simple QML slider app
Forum Updated to NodeBB v4.3 + New Features

Simple QML slider app

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 2.2k 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.
  • N Offline
    N Offline
    nitin_867
    wrote on last edited by
    #1

    Hi All,

    I am totally new in Qt development. Even not enough familiar with c++ language too :(

    I am trying to develop an Qt GUI Application which have two images ("Im1" & "Im2"). The main purpose of this application is to slide Im1 on Im2 based of different values of a variable (Lets say, name of variable is "Vl")

    0========================================== position at Vl=0;

    =============0================================= position at Vl=2;

    =======================0======================= position at Vl=3;

    ========================================0====== position at Vl=9;

    So basically Im1(0) has to be move on Im2(========) depending upon different values of 'Vl'. Its also like a loading bar.

    I went through some QML element such as Transition, translate etc but do not have enough knowledge to use the. Could annyone please help me out. Thanks in advance.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nitin_867
      wrote on last edited by
      #2

      any update?

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chrisadams
        wrote on last edited by
        #3

        Wrong subforum. Ask a moderator to move your thread to the QtQuick forum.

        The short answer to your question is: positioning.
        @
        Image {
        id: sliderImage
        // position, relative to parent item:
        x: 0
        y: 0
        // geometry, example only
        width: 400
        height: 50
        }

        Image {
        id: sliderKnob
        // position, relative to parent...
        y: 0
        x: someVariable * 36 // if someVariable ranges in value from 0 through to 10.
        width: 40
        height: 40
        }
        @

        Cheers,
        Chris.

        1 Reply Last reply
        0
        • N Offline
          N Offline
          nitin_867
          wrote on last edited by
          #4

          Thanks Chris, Appreciated your help..

          Actually i have to deploy this application on an embedded board by cross compling it (Will use qmake of corresponding toolchain).

          Could you please explain how can I combine "Vl" and Im1(0)..? Meaning i have some changing values (ranging from 0 to 10) which i am reading from a file and i want to assign these value "Vl" variable. Based on that the Im1 will slide as illustrated in previous post... Also the program has to be run for infinte time (Continuously reading values from a file -- > reads one value at a time ---> assigning same to Vl --> moving Im1 based on current Vl value..... All these operations should be in sync)..

          Please help ... Thanks

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nitin_867
            wrote on last edited by
            #5

            Anyone can further provide update on this ?

            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