Problem seems to be in this code:
Tasker *tasker = new Tasker(this);
tasker->show();
Tasker *tasker = new Tasker(this);
tasker->show();
To copy to clipboard, switch view to plain text mode
It open new window with default object values. How to open ALREADY HIDDEN window ?
When I use function Tasker::show(); in file tasker.cpp it works - window is restored to state before hidding.
But when I use this function in mainwindow.cpp file
void MainWindow::on_actionTasker_activated()
{
if (OpenFirstTime == 0) {
Tasker *tasker = new Tasker(this);
tasker->show();
OpenFirstTime=1;
}
else {
//Tasker d;
//d.show(); -> open window just for second
Tasker::show(); // makes error
}
}
void MainWindow::on_actionTasker_activated()
{
if (OpenFirstTime == 0) {
Tasker *tasker = new Tasker(this);
tasker->show();
OpenFirstTime=1;
}
else {
//Tasker d;
//d.show(); -> open window just for second
Tasker::show(); // makes error
}
}
To copy to clipboard, switch view to plain text mode
I got error:
Cannot call member function 'Void QWidget::show()' without object
Cannot call member function 'Void QWidget::show()' without object
To copy to clipboard, switch view to plain text mode
How to solve it ?
Bookmarks