我是Qt的新手,我想通过一些参数从QThread向主线程发出信号。它不起作用。我做错了什么?
private static void init() {
speechCloud = new IvonaSpeechCloudClient(new IvonaCredentials("secretKey", "accessKey"));
speechCloud.setEndpoint("https://tts.eu-west-1.ivonacloud.com");
}
我也尝试用数组而不是指针。它没有用。
感谢。
答案 0 :(得分:2)
校准[8]在堆栈上,因此在读取器函数返回时会被销毁。您需要使其持久化(在堆上分配),以便在传递信号时它仍然存在。