Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Integrate Q3DScatter into Mainwindow ui using QWidget as window container

Integrate Q3DScatter into Mainwindow ui using QWidget as window container

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 288 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Antoi
    wrote on last edited by
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • A Antoi

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved