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. [QT3D] QML/C++ mix
Forum Updated to NodeBB v4.3 + New Features

[QT3D] QML/C++ mix

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 519 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.
  • G Offline
    G Offline
    guy incognito
    wrote on last edited by guy incognito
    #1

    I got a C++ Qt3D-application which is similar to the basic shapes example. The problem is, that the only approach to add widgets to the Qt3D-window seems to be via QWidget::createWindowContainer (correct me if I'm wrong), for example, adding a button to Qt3DWindow:

    Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow();
    QWidget *container = QWidget::createWindowContainer(view);
    QWidget *widget = new QWidget;
    QHBoxLayout *hLayout = new QHBoxLayout(widget);
    hLayout->addWidget(container, 1)
    
    QPushButton* button = new QPushButton;
    button->setText("Hello World");
    hLayout->addWidget(button)
    

    The problem is that this approach causes problems with Android devices, so I would like to set up the 3DWindow and UI-Elements with QML but leave all the other stuff, like creating Entities, in C++. How would I do this?

    Edit: This old topic describes what I want to do, but it is unanswered

    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