hi
i want that when horizontalSlider will change, widgets be Apparent or hidden .
#include "addaward.h"
#include "ui_addaward.h"
#include "stringclass.h"
Addaward
::Addaward(QWidget *parent
) : ui(new Ui::Addaward)
{
ui->setupUi(this);
ui->label2->setHidden(true);
ui->lineEdit_2->setHidden(true);
// "a" is a int type
a = ui->horizontalSlider->value();
setVisiblity();
}
Addaward::~Addaward()
{
delete ui;
}
void Addaward::setVisiblity()
{
switch(a)
{
case 2:
{
ui->label2->setHidden(false);
ui->lineEdit_2->setHidden(false);
} break ;
}
}
#include "addaward.h"
#include "ui_addaward.h"
#include "stringclass.h"
Addaward::Addaward(QWidget *parent) :
QDialog(parent),
ui(new Ui::Addaward)
{
ui->setupUi(this);
ui->label2->setHidden(true);
ui->lineEdit_2->setHidden(true);
// "a" is a int type
a = ui->horizontalSlider->value();
setVisiblity();
}
Addaward::~Addaward()
{
delete ui;
}
void Addaward::setVisiblity()
{
switch(a)
{
case 2:
{
ui->label2->setHidden(false);
ui->lineEdit_2->setHidden(false);
} break ;
}
}
To copy to clipboard, switch view to plain text mode
But it does not work !
Bookmarks