Integrate Q3DScatter into Mainwindow ui using QWidget as window container
-
Dear all,
I want to insert a Q3DScatter inside a mainwindow ui (which also contains other elements). I'm using Qt 6.6.1 and i'm quite new with qt.
I'm trying to create a QWidget as a window container in which embed the Q3DScatter element:
Q3DScatter *scatter = new Q3DScatter(); QWidget *container = QWidget::createWindowContainer(scatter); ui->horizontal_layout->addWidget(container);
I obtain this error message in the second line of code:
error: Cannot initialize a parameter of type 'QWindow *' with an lvalue of type 'Q3DScatter *'
How could i make this work? Thanks in advance.
-
Dear all,
I want to insert a Q3DScatter inside a mainwindow ui (which also contains other elements). I'm using Qt 6.6.1 and i'm quite new with qt.
I'm trying to create a QWidget as a window container in which embed the Q3DScatter element:
Q3DScatter *scatter = new Q3DScatter(); QWidget *container = QWidget::createWindowContainer(scatter); ui->horizontal_layout->addWidget(container);
I obtain this error message in the second line of code:
error: Cannot initialize a parameter of type 'QWindow *' with an lvalue of type 'Q3DScatter *'
How could i make this work? Thanks in advance.
@Antoi said in Integrate Q3DScatter into Mainwindow ui using QWidget as window container:
I'm trying to create a QWidget as a window container
Why?
Q3DScatter is a QWidget...