![]() In which case, you are on your own, because I say you can't have it and I am done with this discussion. This would be the lines you need in your vimrc for this purpose: set clipboard+unnamed ' use the clipboards of vim and win set paste ' Paste from a windows or from vim set go+a ' Visual selection automatically copied to the clipboard. (That means, for whatever reason, you want/need only a "terminal", like xterm or gnome-terminal, for your purposes, nothing else will do. ![]() (That means you understand you cannot have a "terminal", but you will issue your own QProcess commands from your Qt app, get the output, and paste it into a widget for the user to see.) Then I want one of just two answers from you: I want you to read that sentence really carefully, and slowly, so you understand. Would running OS commands and showing their output in a widget, optionally allowing the user to type a command into a line edit to be executed instead of/as well as your code issuing its own commands, suffice for what you want to achieve? To paste copied text into your Linux terminal, use the Ctrl + Shift + V keyboard combination. Please read my question above and answer my question, not your own question or what you would like or what you cannot have. This is the last time I will say this: I know that is what you want but you cannot do it with a "terminal". I would like to communicate with terminal,both writing and reading Isn't that enough for what you actually want to said in Qprocess: You are issuing OS commands behind the scene via QProcess and you are putting the output text into the plain text window for the user to see. In your code append the output to your QPlainTextEdit.From QProcess get the output from that command.Use QProcess to execute arbitrary Linux commands (e.g.Create a QPlainTextEdit or similar window in your app. ![]() If you forget about a terminal like xterm or gnome-terminal, what you can do from Qt is: That is what you want, to be able to keep sending it commands, right? And you cannot do that. The problem is you show you want to be able to then send it subsequent commands while it is running (like ls). Let's be clear: from your code you can do a (single) command when it starts up via xterm -e. Gnome-terminal acts much the same as xterm, and you cannot do what want with it any more than with xterm. You probably use gnome-terminal, but depends on your desktop manager. There isn't any one such thing as "Ubuntu terminal". May I know ,can we give commands to Ubuntu terminal at runtime through our qt application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |