Neither of them. If you have a native C++ application, you should not depend on bash. Open the device directly in Qt.