Reply
Thread Tools
Posts: 180 | Thanked: 76 times | Joined on May 2010
#61
Another solution:
Code:
arguments << ui->Transition->currentText() << ui->Font->currentText() << ui->Color->currentText() << QVariant(ui->checkBoxActivate->isChecked()).toString());

Last edited by Diph; 2010-07-17 at 18:22.
 
d-iivil's Avatar
Posts: 2,154 | Thanked: 2,186 times | Joined on Dec 2009 @ Hellsinki, Finland
#62
Originally Posted by Diph View Post
API is your best friend: http://doc.trolltech.com/qt-maemo-4.....html#finished

Code:
connect(process, SIGNAL(finished(int), this, SLOT(processFinished(int));
Code:
MainWindow::processFinished(int exitCode)
{
   //Do something
}
Damn this is confusing :-D Even simplest action needs code in at least three different place. Well, tried and tried and tried, but all I get is these errors (build issues):
untermintaed argument list invoking macro "SIGNAL"
- in constructor 'MainWindow::MainWindow(QWidget*):
'process' was not declared in this scope
'SIGNAL' was not declared in this scope
expected ; at end of input
expected } at end of input

The code is looking like this (mainwindow.cpp):
http://www.pastie.org/1048648
__________________
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
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#63
Modified the code (bit ugly :P): http://www.pastie.org/1048658

So you have to define progress as member variable to be able to access it in two methods.

You can't make connection in constructor because process is defined in method, it's not member variable of MainWindow (of course you can make it a member variable).
 

The Following User Says Thank You to Diph For This Useful Post:
d-iivil's Avatar
Posts: 2,154 | Thanked: 2,186 times | Joined on Dec 2009 @ Hellsinki, Finland
#64
Originally Posted by Diph View Post
Modified the code (bit ugly :P): http://www.pastie.org/1048658

So you have to define progress as member variable to be able to access it in two methods.

You can't make connection in constructor because process is defined in method, it's not member variable of MainWindow (of course you can make it a member variable).
Thanks in million!

But after putting this:
Code:
private:
       QProgressDialog progress;
into maindowndow.h I get another error:
'QProgressDialog' does not name a type
__________________
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
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#65
mainwindow.h

Code:
#include <QProgressDialog>
 

The Following User Says Thank You to Diph For This Useful Post:
d-iivil's Avatar
Posts: 2,154 | Thanked: 2,186 times | Joined on Dec 2009 @ Hellsinki, Finland
#66
Originally Posted by Diph View Post
mainwindow.h

Code:
#include <QProgressDialog>
So sorry to bother you again, but I just can't figure out why I'm getting now new build issues (my googling skills seems to lack big time).

Now I'm getting this:
"ISO C++ forbids declaration of 'processFinished' with no type"
"no 'int MainWindow:rocessFinished(int)' member function declared in class 'MainWindow'

Edit: both errors are pointing at row 34 @ mainwindow.cpp

And the code is like this (mainwindow.cpp):
http://www.pastie.org/1049376

(mainwindow.h):
http://www.pastie.org/1049377
__________________
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

Last edited by d-iivil; 2010-07-18 at 15:40.
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#67
Forget to put return value to method.

http://www.pastie.org/1049378

E: You have to add method declaration to mainwindow.h: http://www.pastie.org/1049383

Last edited by Diph; 2010-07-18 at 15:37.
 

The Following User Says Thank You to Diph For This Useful Post:
d-iivil's Avatar
Posts: 2,154 | Thanked: 2,186 times | Joined on Dec 2009 @ Hellsinki, Finland
#68
Originally Posted by Diph View Post
Forget to put return value to method.

http://www.pastie.org/1049378

E: You have to add method declaration to mainwindow.h: http://www.pastie.org/1049383
Thanks, this part is working now. But my destroying attemt of the progress isn't. It's saying that it's protected:
ävoid QWidget::destryi(book, bool)' is protected.
__________________
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
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#69
Just use progress.close().
 

The Following User Says Thank You to Diph For This Useful Post:
d-iivil's Avatar
Posts: 2,154 | Thanked: 2,186 times | Joined on Dec 2009 @ Hellsinki, Finland
#70
Originally Posted by Diph View Post
Just use progress.close().
That one I should have figured out myself :P Thanks!

Almost there with this:
- progress bar is showing up and everything looks fine

Only problem is that it won't run the script anymore. No errors no nothing, it just won't start
__________________
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
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:41.