prasad1001
29th March 2014, 07:59
Hello all,
I am new to Qt, please tell me how to show and hide the Qlabel message continuously on my mainwindow...
Here is my code..
MainWindow.cpp
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
label=ui->label;
display();
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::display()
{
while(1)
{
label->show();
sleep(1000);
label->hide();
}
}
when i run the program mainwindow is not comming...and no errors are comming..
Please help me..
Thank you.
I am new to Qt, please tell me how to show and hide the Qlabel message continuously on my mainwindow...
Here is my code..
MainWindow.cpp
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
label=ui->label;
display();
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::display()
{
while(1)
{
label->show();
sleep(1000);
label->hide();
}
}
when i run the program mainwindow is not comming...and no errors are comming..
Please help me..
Thank you.