Important: Please read the Qt Code of Conduct -

If i want to place QWebKit on top of OpenGL what is the best way to do it ?

  • does this example :
    from 2008 is valid or there is better ways now in 2011?

  • hi
    yes , i download you model viewer modified demo
    do you have any source code to this browser code??

  • I don't understand.

    Line 70 - 74 of openglscene.cpp

    QWebView *webView = new QWebView();

    QWidget *instructions = createDialog(tr("Web Browser"));


    Then just go to
    or in particular

    You will find all of the api's to make the web browser of your dreams ;)

  • i guess your code that i was download is not updated with browser example

  • my mistake i did't download your link..
    wow performance is really crap ... hope that Qt will fix that in the next versions

  • No problem... lol Probably why you don't see alot of 3D Qt Web Browsers out there.

  • If your feeling adventures there is also Berkelium it's made to render to an OpenGL or DirectX texture.

    Berkelium is a BSD licensed library that provides off-screen browser rendering via Google's open source Chromium web browser.

    It takes advantage of Chromium's multiprocess rendering to isolate browsers from each other and can render to any buffer in memory. The user of the library can inject input and javascript code into web pages to control them, as well as listen for events generated by the page such as navigation events, load sequence events and paint events. Berkelium provides a small API for embedding a fully functional browser into any application.

    Source is here.

    Binary is here.

  • wow this is great stuff!

  • Being that you posted this in the Game Development forum, might I make a suggestion for a game development framework.



    Ogre3D Example
    // g++ main.cpp -o main pkg-config --libs --cflags OGRE OIS

    #include <Ogre.h>
    #include <OgreFrameListener.h>
    #include <iostream>

    using namespace Ogre;

    class MyFrameListener : public FrameListener {
    bool frameStarted (const FrameEvent &evt);
    bool frameEnded (const FrameEvent &evt);
    bool frameRenderingQueued (const FrameEvent &evt);

    bool MyFrameListener::frameStarted(const FrameEvent &evt) {
    std::cout << "Frame Started" << std::endl;
    return true;

    bool MyFrameListener::frameEnded(const FrameEvent &evt) {
    std::cout << "Frame Ended" << std::endl;
    return true;

    bool MyFrameListener::frameRenderingQueued(const FrameEvent &evt) {
    std::cout << "Frame Queued" << std::endl;
    return true;

    int main(void)
    // Create an instance of the OGRE Root Class
    Root* root = new Root;

    // Configures the application
    if (!root->restoreConfig())

    // Create a render window
    RenderWindow* window = root->initialise(true, "Tutorial 1");

    // Create a new scene manager.
    SceneManager* sceneManager = root->createSceneManager(ST_GENERIC);
    sceneManager->setAmbientLight(Ogre::ColourValue(0.0, 0.0, 0.0));

    // Create a new camera
    Camera* camera = sceneManager->createCamera("Camera");

    // Add our model to our resources and index it

    ResourceGroupManager::getSingleton().addResourceLocation("Media/packs/", "Zip");
    ResourceGroupManager::getSingleton().addResourceLocation("Media/models/", "FileSystem");

    Light* light1 = sceneManager->createLight("Light1");
    // Set Light Color
    light1->setDiffuseColour(1.0f, 1.0f, 1.0f);
    // Set Light Reflective Color
    light1->setSpecularColour(1.0f, 0.0f, 0.0f);
    // Set Light (Range, Brightness, Fade Speed, Rapid Fade Speed)
    light1->setAttenuation(10, 0.5, 0.045, 0.0);

    Entity* lightEnt = sceneManager->createEntity("LightEntity", "sphere.mesh");
    SceneNode* lightNode = sceneManager->createSceneNode("LightNode");
    lightNode->setScale(0.01f, 0.01f, 0.01f);
    lightNode->setPosition(0, 4, 10);


    // Using the camera create a viewport and set the background color to black
    Viewport* viewport = window->addViewport(camera);

    // Use the viewport to set the aspect ratio of the camera
    camera->setAspectRatio(Real(viewport->getActualWidth()) /

    // Create an instance of our model and add it to the scene
    Entity* ent = sceneManager->createEntity("Sinbad.mesh");
    SceneNode* entNode = sceneManager->createSceneNode("Character");

    // Create an instance of the MyFrameListener Class and add it to the root object
    MyFrameListener* myListener = new MyFrameListener();

    // Tell root to start rendering

    // Cleanup
    delete myListener;
    delete root;

    return 0;

    For water there is Hydrax

    For Sky and Weather Effects there is SkyX
    Note: It,s used in the Hydrax screenshot above.

    There actually really easy to use.

    There is also.....

    Cutexture: A Framework for Qt User Interfaces in Ogre3D

    Note: Berkelium can be used directly with Ogre3D and Qt

  • If your interested in doing 3D (Model, Texturing, Animation, Compositing, .....) with Blender I am a Blender Master

    Just click on my profile and send me an e-mail I am sure I can get you going in the right direction.


  • Impressive work zester!

  • Great stuff , thanks!
    are you doing planing to do the game in Qt3d?

  • bq. Hi are you doing planing to do the game in Qt3d?

    Qt3d was a consideration. After trying it out for sometime I came to the conclusion that for my
    "No Rest For The Wicked" project it wasn't a very good fit. Qt3d AFAIK has issues with lights and doesn't
    have bone animation support. Both of those issues are deal breakers.

    As of right now for a Highpoly game OGRE3D is the best fit and for a Lowpoly Browser Based
    game Three.js is the best fit.

    Why? What did you have in mind?

  • I have in my mind to make interactive applications for kids , not 3d games in my opinion its very full market of indie game makers and wannabe game makers very hard to put something good .
    its fun its great programming challenge but with no ROI for your work.
    now im looking for platform , Qt is winner for me.

  • Qt3d would be a good fit for interactive applications for kids.

Log in to reply