Unsolved How to catch the shell command information?
-
Hi All,
I used the shell command getevent to catch the keypad information.
I could use getevent to catch the push button interrupt of keypad in shell,but I could not use QT to catch the getevent information.
Could any function solve the problem? -
@Yen_Chou You can use QProcess to execute other executables. And get their output via https://doc.qt.io/qt-5/qprocess.html#readAllStandardOutput
-
@jsulm
Thank you for your help.
I used the qprocess readAllStandardOutput function,but it still did not output the information immediately until I pushed the button many times. -
@Yen_Chou With that amount of information nobody will be able to tell you what is wrong.
Please tell us what you did, best would be to show the code.
Also, you should use https://doc.qt.io/qt-5/qprocess.html#readyReadStandardOutput signal and call readAllStandardOutput in the slot connected to that signal. And you should read the readAllStandardError() (here also connect slot to https://doc.qt.io/qt-5/qprocess.html#readyReadStandardError)