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. [SOLVED][HELP] how to get a value of slider from UI_XXXX.h
Forum Updated to NodeBB v4.3 + New Features

[SOLVED][HELP] how to get a value of slider from UI_XXXX.h

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 1.6k 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.
  • Y Offline
    Y Offline
    YDYD
    wrote on last edited by
    #1

    Hi all and thanks for everyone that helped me before, appreciate it!

    Here is a new question:

    I am recently designing a GUI using dialog.ui
    i used a lot of slider, i need to read the slider value,
    anyone tell me how can i get it from ui_dialog.h ?
    is it possible?
    here is a photo of GUI:
    !https://www.facebook.com/photo.php?fbid=10152505449848695&set=a.10150169149868695.310362.677773694&type=1&theater()!

    After this question, i would like to save these values that i get from slider in to a text file that using XML format.
    How can i achieve this?

    Please advise,

    Best regards,
    YDYD

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      access your designer components in constructor/somewhere using ui-><objectname>. Object name is present in the designer property window.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        YDYD
        wrote on last edited by
        #3

        hi Dheerendra,

        I'm so sorry that, I am not really understand what are you trying to explain to me.
        Any command line to execute this?

        i would like to get the Slider value, for example: my slider range is 0~255,
        when i drag to position 100, i would like to read 100 from it, is it possible?

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          YDYD
          wrote on last edited by
          #4

          Hi Dheerendra,

          I get what you mean already,

          so if my slider name "hueSlide1",

          i would like to get the position,then i need to type,

          ui->hueSlide1-> ??

          so what should i put at "??"

          1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            ui->hueSlide1->value(). This gives you the current position.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            1 Reply Last reply
            0
            • Y Offline
              Y Offline
              YDYD
              wrote on last edited by
              #6

              ok, thx, appreciate!

              1 Reply Last reply
              0
              • dheerendraD Offline
                dheerendraD Offline
                dheerendra
                Qt Champions 2022
                wrote on last edited by
                #7

                move this issue to [SOLVED] state

                Dheerendra
                @Community Service
                Certified Qt Specialist
                http://www.pthinks.com

                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