![]() |
2010-07-18
, 18:44
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#72
|
class MainWindow { ... private: void processFinished(int code);
void MainWindow::processFinished(int code) { }
connect(progress, SIGNAL(finished(int, QString), this, SLOT(progressFinisshed(int));
![]() |
2010-07-18
, 19:06
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#73
|
It should be connect(..., this, SLOT(processFinished(int) or you can define the method void processFinished() if you don't need the exit code.
In header file (*.h) you declare methods and in source file (*.cpp) you write the implementation. Method declarations and implementations have to be in same form, like
Header:
Cpp:Code:class MainWindow { ... private: void processFinished(int code);
Actually you can make the connect without less attributes:Code:void MainWindow::processFinished(int code) { }
and it should work.Code:connect(progress, SIGNAL(finished(int, QString), this, SLOT(progressFinisshed(int));
QProcess *process = new QProcess(this); process->start("/sbin/launchblack", arguments);
QProcess::execute("/sbin/launchblack", arguments);
![]() |
2010-07-18
, 20:00
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#74
|
![]() |
2010-07-19
, 06:30
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#75
|
The Following User Says Thank You to d-iivil For This Useful Post: | ||
![]() |
2010-07-19
, 08:05
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#76
|
![]() |
2010-07-19
, 14:32
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#77
|
Okay, after debugging I'm sure my scipt ends correctly and singnal finished(int) is sent to the slot and slot receives it. The damn progress-dialog won't just close with command progress.close()
Any other ways to make sure the progress-dialog will get killed?
Edit. Seems like progress.cancel(); did the trick
![]() |
2010-07-19
, 15:56
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#78
|
![]() |
2010-07-20
, 15:01
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#79
|
![]() |
2010-07-20
, 15:09
|
Posts: 353 |
Thanked: 263 times |
Joined on Dec 2009
@ Finland
|
#80
|
void MainWindow::saveSettings() const { QSettings sett("blackplastic-theme/config"); sett.setValue("font", text_of_combobox /* you now how to get that already */); // Other values like that also } void MainWindow::loadSettings() { QSettings sett("blackplastic-theme/config"); bool bOK; QString font = sett.value("font", QVariant("")).toString(); // Other values likewise and set comboboxes to show values }
The Following User Says Thank You to TNiga For This Useful Post: | ||
Object::connect: No such slot MainWindow:
Object::connect: (receiver name: 'MainWindow')
If you're rich and you think I deserve a cold beer, you may donate one or two :-P
80's style stadium rock is back - FIRENOTE
Hi-Octane heavy metal - FORCE MAJEURE