Qt Console with Bash

后端 未结 2 1506
长发绾君心
长发绾君心 2021-01-25 04:27

I am writing a program using the Qt framework. I would like the user to be able to have access to a console/terminal from within the application itself.

In other words,

2条回答
  •  后悔当初
    2021-01-25 05:19

    You could try QProcess. This is not strictly "embedding" a terminal in your app, but it it really easy to use, you can kick off a terminal that is owned by your app. You can even connect (with signals / slots) to its output and interact with it in a limited fashion... depends on what you need.

    Here is the doc with some simple examples: http://qt-project.org/doc/qt-5/QProcess.html

    I am not at my Qt-PC today so I don't have an "interacting" example for you, but if you think this is a way for you to go then I can dig that out...

提交回复
热议问题