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. How to plug a Ogre (Game Engine) canvas to the QWidget based Widget?

How to plug a Ogre (Game Engine) canvas to the QWidget based Widget?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 994 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.
  • L Offline
    L Offline
    lucky7456969
    wrote on last edited by
    #1

    Currently, I am encountering a problem, when I start writing a new class
    called myDXWidget, it derives from QWidget and BaseApplication of the OGRE project.
    When I fire myDX9Widget->go() (BaseApplication method), this function merely start the program pipeline.
    Loading in all the resources, cameras etc
    But the problem arises, I found the myDX9Widget->go is actually new'ing a Window
    so that there are 2 windows for my application, one for the game, one for the QT
    How can I make the myDX9Widget runs as a child wndow inside of QT, rather than 2 separate windows?

    I tried
    [code]
    #include "./MainWindow.h"
    #include <QDockWidget.h>

    MainWindow::MainWindow() {

    widget.setupUi(this);
    
    
     
    dx9Widget = new myDX9Widget();
    //dx9Widget->go();
    
     QDockWidget *dockWidget = new QDockWidget(tr("Dock Widget"), this);
      dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea |
                                     Qt::RightDockWidgetArea);
       dockWidget->setWidget(dx9Widget);
      addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
    

    }

    MainWindow::~MainWindow() {
    delete dx9Widget;
    }
    [/code]

    no working

    Thanks
    Jack

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

      Hi,

      Not an Ogre professional but "this":http://www.ogre3d.org/tikiwiki/QtOgre might be interesting

      Hope it helps

      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
      0
      • L Offline
        L Offline
        lucky7456969
        wrote on last edited by
        #3

        Wow, that's really nice.
        Thanks
        Jack

        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