void MainWindow::change_gui_after_downloading(int value){
if(value){
ui->actionPc->setEnabled(false); //error here
}
else{
ui->actionPc->setEnabled(true); //error here
}
}
void MainWindow::change_gui_after_downloading(int value){
if(value){
ui->actionPc->setEnabled(false); //error here
}
else{
ui->actionPc->setEnabled(true); //error here
}
}
To copy to clipboard, switch view to plain text mode
and method in another class
void download::access_to_gui(){
MainWindow* pointer
if(this->download_value)
pointer->change_gui_after_downloading(1);
else
pointer->change_gui_after_downloading(0);
}
void download::access_to_gui(){
MainWindow* pointer
if(this->download_value)
pointer->change_gui_after_downloading(1);
else
pointer->change_gui_after_downloading(0);
}
To copy to clipboard, switch view to plain text mode
When I create new object for MainWindow class in download class I get "QWidget: Must construct a QApplication before a QPaintDevice", when I create pointer for MainWindow I get "Segmentation fault" in change_gui_after_downloading(int) function.
When I run change_gui_after_downloading(int) directly in MainWindow its working.
Bookmarks