Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved: How to remove the tick of checkBox with code?

    General and Desktop
    4
    6
    1239
    Loading More Posts
    • 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.
    • A
      Adam_wang last edited by

      I want change a Qt window. And I need to remove the tick of check Box which indicates that the ceckBox is checked using my code.Thus I can reset the checkbox return to unchecked state.The code statements may look like the followed:

      if(ui->checkBox_HB->ischecked())
      {
      Here I want to make the checkbox return back to unchecked state.What sentence I can use here?

      }

      1 Reply Last reply Reply Quote 0
      • S
        sandy.martel last edited by

        setChecked

        1 Reply Last reply Reply Quote 0
        • A
          ankursaxena last edited by

          ui->checkBox_HB->setChecked(false);

          1 Reply Last reply Reply Quote 0
          • A
            Adam_wang last edited by

            [quote author="ankursaxena" date="1404793606"]ui->checkBox_HB->setChecked(false);
            [/quote]

            OK,it works well,and thank you very much ! I’m a freshman to study Qt by myself.I indeed have to read more materials about Qt assistance, maybe I can solve the problem by myself.

            1 Reply Last reply Reply Quote 0
            • A
              Adam_wang last edited by

              [quote author="sandy.martel" date="1404793502"]setChecked
              [/quote]

              OK, thank you very much ! I’m a freshman to study Qt by myself.I indeed have to read more materials about Qt assistance, I believe I can solve the problem by myself.

              1 Reply Last reply Reply Quote 0
              • S
                Sam last edited by

                [quote author="Adam_wang" date="1404800096"]
                [quote author="sandy.martel" date="1404793502"]setChecked
                [/quote]

                OK, thank you very much ! I’m a freshman to study Qt by myself.I indeed have to read more materials about Qt assistance, I believe I can solve the problem by myself.[/quote]

                Great ! you can now edit your first post and append Solved to the title if this issue is resolved !.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post