On the following I'm trying to change text of QCustom3DLabel but it doesn't change. So, any suggestion on how to deal with this?
MainWidget::MainWidget(QWidget *parent) : QWidget(parent)
{
resize(800,600);
auto vLayout = new QVBoxLayout(this);
auto graph = new Q3DBars;
vLayout->addWidget(QWidget::createWindowContainer(graph));
auto camera = graph->scene()->activeCamera();
camera->setCameraPreset(Q3DCamera::CameraPresetIsometricLeft);
graph->axes()[0]->setRange(0,5);
graph->axes()[1]->setRange(0,5);
graph->axes()[2]->setRange(0,5);
label = new QCustom3DLabel;
label->setText("123");
label->setScaling({5,5,5});
label->setPosition({1,1,1});
graph->addCustomItem(label);
auto timer = new QTimer;
connect(timer, &QTimer::timeout, this, &MainWidget::setText);
timer->start(2000);
}
void MainWidget::setText()
{
qDebug() << "settext";
label->setText("1234567890");
}