Guest User

Untitled

a guest
Jul 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. bind("key-down--z", \: (void; Event event)
  2. {
  3. use qt;
  4. use encoding;
  5. // process = qt.QProcess(mainWindowWidget());
  6. qprocess = QProcess(mainWindowWidget());
  7.  
  8. connect(qprocess, QIODevice.readyRead,
  9. \: (void;)
  10. {
  11. while (qprocess.canReadLine())
  12. {
  13. let line = utf8_to_string(qprocess.readLine(0).constData());
  14. print("%s\n" % line);
  15. }
  16. });
  17.  
  18. connect(qprocess, QProcess.finished,
  19. \: (void; int exitCode)
  20. {
  21. print("FINISHED\n");
  22. });
  23.  
  24. qprocess.start("/bin/ls",
  25. string[] {"-al", "/Users/jimh/"},
  26. QIODevice.ReadOnly | QIODevice.Text);
  27. });
Add Comment
Please, Sign In to add comment