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. set dial value with pushbutton
Forum Update on Monday, May 27th 2025

set dial value with pushbutton

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 564 Views
  • 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.
  • R Offline
    R Offline
    rapid84
    wrote on last edited by
    #1

    Hi,
    I am trying to set a dial value to maximum with a pushbutton. I have used this ;

    ui->dial->setMaximum(100);
    

    but it does not work. what can be done ?

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You're not setting it to maximum. You're setting the maximum to 100.
      To set it to maximum use ui->dial->setValue(ui->dial->maximum());

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rapid84
        wrote on last edited by
        #3

        @Chris-Kawa said:

        ui->dial->setValue(ui->dial->maximum());

        Thanks, it works.

        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