Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Crash using QT WebKit on Windows
Forum Updated to NodeBB v4.3 + New Features

Crash using QT WebKit on Windows

Scheduled Pinned Locked Moved Qt WebKit
4 Posts 3 Posters 2.9k 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.
  • A Offline
    A Offline
    aerkis
    wrote on last edited by
    #1

    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;
    webView->load(QUrl(url));@

    Then I convert the widget rendering into a image
    @QImage image(widget->width(), widget->height(),
    QImage::Format_ARGB32);
    widget->setAutoFillBackground(false);
    widget->render(&image);@

    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"@

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      Hi,

      in the first code segment, you cast widget types:

      @
      QWebView *webView = (QWebView *) widget;
      webView->load(QUrl(url));
      @

      what type has widget?

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aerkis
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

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

          (Z(:^

          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