私のコードには、qlabel を更新する次の関数があります。qlabel は非常に頻繁に更新されます。コードは
void foo::someMethod(std:atring a)
{
{//begin
boost::lock_guard<boost::mutex> lock(mutex_label);
frm->mylabel->setText(a.c_str());
}//end lock
}
そしてしばらくすると、アサーション エラーが発生します。
assert failure in documentRect: "document rect called for label that is not a text label! , file widgets\qlabel.cpp
それを引き起こしている可能性のある提案はありますか?また、値が表示されない場合もあります。値を更新するには、フォームを移動する必要があります