[Resolved] Can't disable or hide a button on Dialog...
-
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.