String replace content
I am new to Qt. I have a question:
I'm trying to convert a string like this type path C: / Dir1/Dir2/Dir3
in a chain like this C: \ \ Dir1 \ \ dir2 \ \ dir3 as I can tell it to qprocess then that is the path from where I launch the executable
where path has to be of this type C: \ \ Dir1 \ \ dir2 \ \ dir3 and what I get is
C: / Dir1/Dir2/Dir3
Process.Start ("msiexec.exe", QStringList () <<"/ qf" <<"/ uninstall" <<"openofficeorg31.msi");
When I launch the process Uninstaller window opens but when I close.
Someone could help me with this?
Path handling is transparent in Qt. If you want it to work across platforms with different path separator always use "/" Unix style separator. Qt will internally convert the path according to target platform.
You can simply convert "" to "/" and pass the same to QProcess.
If you like to translate to native separators you can use "toNativeSeparators":http://doc.qt.nokia.com/4.7/qdir.html#toNativeSeparators
thank you for your request....
As I can convert / to , appreciate any example.
If we know the scope you want to reach we can help you. The conversion what should be? a QString? A patch that Qt should manage? What ?
please providing some more details. or given any example..
@robort1989: sorry I don't understand your links in this post.
I deleted the spam links in the post of robort.
@Eddy: thank you. It was corret to report ? I am not a puritane, but it seems really bad in this context.
[quote author="Alicemirror" date="1316190908"]@Eddy: thank you. It was corret to report ? I am not a puritane, but it seems really bad in this context.[/quote]
Yes, well done. They were not Qt related.
This was not the only one, so we will keep an eye on it.