c++ - Problems communicating with external editor in Qt4 -


I'm writing command line QT4 script (using QCore application) on Mac OS X.

Using C ++ programming code optimized with QT4, Second Edition P. 313:

QTemporaryFile Outfile; If return! (OutFile.open ()); Qustring filename = outfile.philname (); QTextStream Out (and Outfile); Outside & lt; & Lt; Initial_text; OutFile.close (); QProcess :: execute (editor, QStringList ()

When run with the editor set to "/ usr / bin / vim" above, "Wim: Warning: does not have input terminal" is printed, then vim With initial text (string initial_text); However, I am unable to edit or quit because the blue print by pressing Escape is done. [In the case of cursor, equal to every other key.

When the editor is set to "/ user / jason / bin" / met "(textmat command-line utility), textmat launch, without initial text document Edit and save, and when I leave, the application reads in the initial lesson (which should have been overwritten).

I'm worried because this code is in the printed book so it can work Should i do for editor I'm using Addiction String?

It looks like your editor "/ user / jason / bin / Buddy "does not support passing a file name as argument.

Try something like this from your terminal:

 " test text "echo Do & gt; Test.txt / users / jason / bin / mate test.txt  

to see if it opens the editor with the correct text.

< / Div>

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -