Qt World Summit: Register Today!

Crash using QT WebKit on Windows

  • Hi everybody,

    I try to integrate QTWebKit (QT 4.8.2 version) into a new presentations software (http://www.taodyne.com).
    It works fine on MacOS and Linux, but when I try to use it on Windows to load the google page, I have a nice crash (see "crash_dump":http://www.taodyne.com/docs/crash_dump.txt).

    To do that, I create a QWebView from a QWidget to load a given url:
    @QWebView *webView = (QWebView *) widget;

    Then I convert the widget rendering into a image
    @QImage image(widget->width(), widget->height(),

    This image is then converted to be used as a simple texture with OpenGL, which will be mapped later on differents shapes.
    @image = QGLWidget::convertToGLFormat(image);
    glBindTexture(GL_TEXTURE_2D, id);
    glTexImage2D(GL_TEXTURE_2D, 0, 3,
    image.width(), image.height(), 0, GL_RGBA,
    GL_UNSIGNED_BYTE, image.bits());

    Any idea what I am doing wrong or why I have this crash ?
    Thanks in advance.

    NOTE : If you want, you could reproduce easily this crash into the corresponding software. Just download the "free version":http://www.taodyne.com/shop/en/content/9-compare-versions-of-tao-presentations, open a blank document and paste the following code (it loads the google page with a size of 800x800) :
    @url 0, 0, 800, 800, "http://www.google.com"@

  • Hi,

    in the first code segment, you cast widget types:

    QWebView *webView = (QWebView *) widget;

    what type has widget?

  • As I said just before the code, it's a QWidget (in fact, it's a child of my main QWidget).

  • Moderators

    You should probably construct it with "new", then.

Log in to reply