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. Q3DScatter in Widget Application

Q3DScatter in Widget Application

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 834 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.
  • M Offline
    M Offline
    MCey
    wrote on last edited by
    #1

    Hi
    I am trying to use Q3DScatter in widget application.
    I added a qwidget on UI and promoted it to a class which has function like below to simply create scatter graph.

    scatterCloud::scatterCloud(QWidget *parent) : QWidget(parent)
    {
    
        Q3DScatter *scatter3d = new Q3DScatter();
        QWidget::createWindowContainer(scatter3d);
        //QWidget *container = QWidget::createWindowContainer(scatter3d);
    
    
        QScatter3DSeries *series = new QScatter3DSeries;
        QScatterDataArray data;
        data << QVector3D(0.5f, 0.5f, 0.5f) << QVector3D(-0.3f, -0.5f, -0.4f) << QVector3D(0.0f, -0.3f, 0.2f);
        series->dataProxy()->addItems(data);
    
        scatter3d->addSeries(series);
        scatter3d->show();
    }
    

    It seems working but nothing is showing up.
    How could I make it work?

    Thanks

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      either:

      • pass a parent to createWindowContainer
      • add QWidget *container to a layout
      • call container->show()

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      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