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

Radio button not checkable for users

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 8.3k 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 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 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 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 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

          • Login

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