Render Qt Application in web browser



  • Hello,

    I am looking for running the Qt application in the web browser.

    There might be various forum threads talking about this.

    One of the thread is "Porting a Qt widget application to a web application":http://qt-project.org/forums/viewthread/50571/

    Sam says that Vaudeville might be interesting for this.

    But, the source code doesn't compile. There are plenty of errors when I download and build.

    Is there any other better option for this cause?

    Thank you,
    Kumara



  • Have you looked at ActiveQt example?? The opengl example is similar to what you want: it embed an activex widget to a web page, since is an exaple it should compile and work.



  • Yes, I had a look at ActiveQt example. But, am not sure if that solves my problem. Still am not able to run my Qt application in the web browser.

    Can you point me to the exact location to find the example that you are talking about?

    Thanks





  • Hi Ceora,

    I had a look at this example. But for reason I could not execute this. There were some errors.

    However, I had a look at the source code.

    [removed]
    function setRot( form )
    {
        GLBox.setXRotation( form.XEdit.value );
        GLBox.setYRotation( form.YEdit.value );
        GLBox.setZRotation( form.ZEdit.value );
    }
    [removed]
    
    <p />
    An OpenGL scene:<br />
    &lt;object ID="GLBox" CLASSID="CLSID:5fd9c22e-ed45-43fa-ba13-1530bb6b03e0"
    CODEBASE="http://qt.nokia.com/demos/openglax.cab"&gt;
    [Object not available! Did you forget to build and register the server?]
    &lt;/object&gt;&lt;br />
    
    &lt;form&gt;
    Rotate the scene:<br />
    X:&lt;input type="edit" ID="XEdit" value="0" /&gt;&lt;br />
    Y:&lt;input type="edit" name="YEdit" value="0" /&gt;&lt;br />
    Z:&lt;input type="edit" name="ZEdit" value="0" /&gt;&lt;br />
    &lt;input type="button" value="Set"  /&gt;
    &lt;/form&gt;
    

    From the code, what I understand is that, from the HTML code, we are calling C++ code to set the rotation.

    This is not what I want.

    I have built my application for embedded target. Now, I want to view the same application in the web browser.

    For example, antkorp tool helps you to run the application in web browser. But, their site does not work anymore. And, in one of forum post, Sam have suggested to look for Vaudeville. But that is broken as well.

    Thanks



  • some time ago i did a test with my own glwidget and i was able to set rotation via mouse event, without html to c++ code, however what kind of error do you get?



  • Hi Ceora,

    You mean, you could run application on desktop/embedded and as well, you could see the application running in web browser?

    Thanks,
    Kumara



  • sorry for the late replay.... However, yes it run perfectly, don't know with embed, but using the example html code plus my own widget, it worked. This was a small test with a small application, i was able to move the gl scene, with mouse, without problem!



  • @ceora Can you tell us if there is prerequisites to use ActiveQt? I am in the same case of @kumararajas. I always get error when compiling examples or simple project.

    Here is my .pro file:

    TEMPLATE = lib
    QT       = core gui widgets axserver
    CONFIG  += dll c++11
    TARGET   = viewerax
    VERSION  = 3.0.0
    
    DEF_FILE = C:/Qt/5.3/Src/qtactiveqt/src/activeqt/control/qaxserver.def
    RC_FILE  = C:/Qt/5.3/Src/qtactiveqt/src/activeqt/control/qaxserver.rc
    
    SOURCES += \
        viewerax.cpp \
        vieweraxfactory.cpp
    HEADERS += \
        viewerax.h


  • @francois Got it! We need to install Visual Studio Express and the corresponding Qt kit. It's not mentioned in the doc.



  • @francois Good! unfortunately i don't know what are the prerequisites, since Qt is cross platform it should compile with all compiler in all platform... Maybe visual studio has better support for COM objects.I think you should report the bug.



  • That's my thought as well. Why i should have visual studio express to run the application?

    What if I want to run the application in linux platform or iOS platform?

    Is there any other easy way?

    Thanks,
    Kumara



  • If i'm not mistaken, COM is a microsoft spec, so other may compiler implement it differently... In fact i've a project that use COM that use some features that are only present with the windows SDK, if use MingGW i get tons of errors...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.