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. [Resolved] Can't disable or hide a button on Dialog...
Forum Updated to NodeBB v4.3 + New Features

[Resolved] Can't disable or hide a button on Dialog...

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

    Hi,

    I'm trying to remove or hide a button from dialog, but I could not do that.
    Where can be the problem:

    @
    DialogConfiguracaoMCI::DialogConfiguracaoMCI(QWidget *parent, int dialogType) :
    QDialog(parent),
    ui(new Ui::DialogConfiguracaoMCI)
    {
    ui->setupUi(this);
    status = 2;
    switch (dialogType) {
    case 0:
    ui->lbTextoAviso->setText("Sistema não está configurado!");
    ui->btConfigurarModeloVeiculo->setEnabled(false);
    ui->btConfigurarModeloVeiculo->setVisible(false);
    break;
    case 1:
    ui->lbTextoAviso->setText("Modelo do veículo desconhecido!");
    ui->btConfigurarModeloVeiculo->setEnabled(true);
    ui->btConfigurarModeloVeiculo->setVisible(true);
    break;
    case 2:
    ui->lbTextoAviso->setText("Veículo customizado!");
    ui->btConfigurarModeloVeiculo->setEnabled(true);
    ui->btConfigurarModeloVeiculo->setVisible(true);
    break;
    }
    setMaximumSize(this->width(), this->height());
    setWindowFlags( ((windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint) );
    }
    @

    The funny thing is that the Dialog is updating the "lbTextAviso" (A label component).
    I really don't now how can Fix it.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dcbasso
      wrote on last edited by
      #2

      Resolved: I clean all the compiled project and compile again and works...

      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