Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
问题如下:
在构造函数中,既然在初始化subscriber_时,就将msg写入label中,那么下面为何还要把一个空的指针给初始化的label,如果将QLabel中的参数删除,为何无法成功运行?
我又重新实验了一下,这里确实不需要给入空指针,结果也能运行成功
label_ = new QLabel(get_qstr_from_msg(std::make_shared<SystemStatus>()));
label_ = new QLable();