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. Using a Q3DScatter with a .ui dialog
Forum Updated to NodeBB v4.3 + New Features

Using a Q3DScatter with a .ui dialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 153 Views 1 Watching
  • 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.
  • bigguinessB Offline
    bigguinessB Offline
    bigguiness
    wrote on last edited by
    #1

    I have a .ui dialog that I am trying to put a Q3DScatter on.

    Currently I have a QWidget in the ui to hold the Q3DScatter and am doing this when the dialog is constructed:

    // graph variable is actually declared in the class header
    Q3DScatter *graph = new Q3DScatter();
    QWidget *container = QWidget::createWindowContainer(graph, ui->widget);
    container->setSizePoilicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    

    The Q3DScatter is shown in the dialog but it's not sized properly. The dialog is composed of a number of horizontal and vertical layouts and the QWidget itself is in a vertical layout.

    I am using the scatter example to try and do this. But it does not use a .ui, it manually constructs the window. Does anyone know of an example that uses a .ui or can anyone give me any ideas how to do this?

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You have to set your container widget in the appropriate layout.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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