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. Enabling an initially disabled QWidget
Forum Updated to NodeBB v4.3 + New Features

Enabling an initially disabled QWidget

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 4.8k 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.
  • X Offline
    X Offline
    Xcessity
    wrote on last edited by
    #1

    Hi,

    this might be a very basic question but it drives me nuts and I can't find any useful information.

    I have three QGroupBox objects which are not enabled in the Qt designer (disabled at application startup). This is intended since i want to enable them at runtime.

    mUi.groupBoxSignalSettingsSmoothingRotationZ->setEnabled(true);

    This call during app runtime to enable these Widgets does not actually enable them, they remain grayed out and disabled.

    Here comes the best part, when I enable these 3 widgets in the designer and disable them during runtime things work normally. The widgets enable and disable as intended.

    What am I missing here?
    Thx for your help.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BelenMuñoz
      wrote on last edited by
      #2

      Hi!!
      My last project worked similar, but I disabled the widgets in constructor and enabled them after and works perfect.
      My code in constructor is:
      @ui->arbol->setDisabled(1);
      ui->frameDerecha->setDisabled(1);@
      And after I enable them this way:
      @ui->arbol->setEnabled(1);
      ui->frameDerecha->setEnabled(1);@

      Regards.

      Me casé con un enano pa jartarme de reí.

      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