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. Radio button not checkable for users
Forum Updated to NodeBB v4.3 + New Features

Radio button not checkable for users

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 8.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.
  • W Offline
    W Offline
    wimschuiteman
    wrote on 24 Dec 2011, 21:31 last edited by
    #1

    Hello

    In a groupbox I have three radiobuttons.
    But I want that I can only checked in my program, not with the mouse.
    I have no idea how I can do that.
    Maybe someone knows how I set it?

    Regards,
    Wim

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hostel
      wrote on 25 Dec 2011, 02:13 last edited by
      #2

      Set a radiobutton from code and set groupbox disabled?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on 25 Dec 2011, 14:40 last edited by
        #3

        The radio buttons and the groupbox can be disabled from code too even if they are placed in the UI using designer.

        From a user's point of view, disabling the button is a good idea, as one knows that clicking on the button doesn't have any effect, then. Leaving the buttons enabled, but "eating" the clicks is annoying, at best.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Seba84
          wrote on 25 Dec 2011, 19:47 last edited by
          #4

          Simple example: @QRadioButton *radioButton = new QRadioButton(this); // defined on ui_file.h

          radioButton->setEnabled(0);
          radioButton->setChecked(1); // or 0 as you like@

          1 Reply Last reply
          0

          1/4

          24 Dec 2011, 21:31

          • Login

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