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: How to remove the tick of checkBox with code?

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

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 1.6k 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.
  • A Offline
    A Offline
    Adam_wang
    wrote on 8 Jul 2014, 01:49 last edited by
    #1

    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
    0
    • S Offline
      S Offline
      sandy.martel
      wrote on 8 Jul 2014, 04:25 last edited by
      #2

      setChecked

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ankursaxena
        wrote on 8 Jul 2014, 04:26 last edited by
        #3

        ui->checkBox_HB->setChecked(false);

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Adam_wang
          wrote on 8 Jul 2014, 06:12 last edited by
          #4

          [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
          0
          • A Offline
            A Offline
            Adam_wang
            wrote on 8 Jul 2014, 06:14 last edited by
            #5

            [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
            0
            • S Offline
              S Offline
              Sam
              wrote on 8 Jul 2014, 06:22 last edited by
              #6

              [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
              0

              1/6

              8 Jul 2014, 01:49

              • Login

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