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
) : 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();
}
}
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();
}
}
To copy to clipboard, switch view to plain text mode
when i run the program mainwindow is not comming...and no errors are comming..
Please help me..
Thank you.
Bookmarks