Skip to content
  • 0 Votes
    4 Posts
    2k Views
    S

    Ok so I managed to import the html by modeling my code similar to the example with:

    QString code = QStringLiteral("qt.jQuery('#first_page').load('html/first_page.html');"); //you can even nest it with: QString code = QStringLiteral( "qt.jQuery('#first_page').load('html/first_page.html', ()=>{" "qt.jQuery('#border_content').load('html/border_content.html', ()=>{" //some other html "qt.jQuery('#last_page').load('html/last_page.html');" "});" "});" );

    unfortunately I now cannot use the qwebchannel.js script anymore and my css gets screwed :(
    even loading it with:

    QFile script_file(":/qtwebchannel/qwebchannel.js"); if(!script_file.open(QIODevice::ReadOnly)) qDebug()<<"Couldn't load Qt's QWebChannel API!"; QString qt_script = QString::fromLatin1(script_file.readAll()); script_file.close(); view->page()->runJavaScript(qt_script);

    did not help. Since it is a small project and I am on a short deadline right now I will put everything in one html file and mark this question als solved.

  • 0 Votes
    5 Posts
    2k Views
    JonBJ

    @FrankiPL
    I suspect @speeter will have long disappeared, as that post was a year ago :)

    Just a thought: have a look at (the first part of) https://raspberrypi.stackexchange.com/a/61086, which claims it's a generic Linux problem rather than just a RPi one. It's not quite the same messages, but worth investigating?

  • 1 Votes
    15 Posts
    9k Views
    M

    @kshegunov ok now I understand! Thanks!

  • 0 Votes
    2 Posts
    2k Views
    A

    Indeed, WebKit has been deprecated and won't, therefore, be shipping with the forthcoming Qt 5.6. However, you can still build from source (or, at least, you should still be able to build it from source).

    As a general rule, new projects ought to use WebEngine, but because there isn't yet a 1:1 correspondance between WebEngine and WebKit (is there ever going to be?!), you might have no choice but have to use WebKit for the time being.

    (I am in that boat too, i.e. WebEngine is currently missing too many things to make it possible for me to drop WebKit -- I tried! --. Yet, I can't see myself building WebKit from source, so I am not going to upgrade to Qt 5.6. In the end, I really wish Qt would release binaries for WebKit. Not as part of Qt 5.6 since it's going to be an LTS, but at least on the side so many people (I am sure) don't feel like their only options are either to build WebKit from source (!!) or stick to Qt 5.5.)

  • 0 Votes
    5 Posts
    2k Views
    JKSHJ

    You can call QWidget::resize() in main.cpp to make your viewer bigger.

  • 0 Votes
    2 Posts
    2k Views
    R

    Hey,

    I am successfully using hxcpp in Qt application. I have not tried it on iOS yet, but android works. But I am not calling any Qt function from haxe. Instead I am building a C++ static lib from haxe containing the backend code. Then I have some C++ wrapper code that connects the backend functions with QML.

    Best Regards,
    Nathan