Just make sure the path is correct. Tryor something like that.Qt Code:
process->addArgument("redfang-2.5/fang/fang");To copy to clipboard, switch view to plain text mode
Just make sure the path is correct. Tryor something like that.Qt Code:
process->addArgument("redfang-2.5/fang/fang");To copy to clipboard, switch view to plain text mode
The exec file of the program is called "fang" and is directly inside the redfang-2.5 folder. So I put:
process->arrArgument("redfang-2.5/fang");
but is nor working, the message is still "proc is not running".
to run the process directly in the command promp what I have to put is:
redfang-2.5/fang -n 1 -r %s-%s -t %d
where %s are two strings and %d is an integer.
I did this:
process->addArgument("redfang-2.5/fang");
process->addArgument("-n");
process->addArgument("1");
process->addArgument("-r");
process->addArgument("0016755116A8");
process->addArgument("-0016755116AA");
process->addArgument("-t");
process->addArgument("5000");
but still "proc is not running"
Please first check what is the current working directory of the application while running. Don't assume you think what it is, just check it. If you can't handle it, just copy or link the application to the directory where your main binary resides.
Finally I put the absolute path of the application an It works.......thank you very much for everything.
I've been thinking about this problem that I had with the path. Is impossible to put the relative path of the program? I tried a lot of different combinations and nothing worked, it only works with the absolute path and this is not really useful for an open source program that will go from one computer to another, isn't it?
The other question is about lineedits. What you can get from a lineedit is a string, just doing lineedit->text(); but what happens if what I have to get from the lineedit is an integer? Is possible to get an integer as an integer, not as a string, from the lineedit? How?
Thanks a lot for your help.
You can use a path relative to the application path by using QApplication::applicationDirPath()
As for the integer - convert the string to integer or use a spin box.
Hi, I would like to say thank you for everything. Now the project is working perfectly. I would like to thank everyone who have helped me.
I have to say that when I started the project I had no idea about Qt language but now I know how useful it is and I will try other things with it, other projects.
Thanks a lot again.
Except, there is no Qt language...Qt language
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks