Error using Qt Creator with WebKit (and app crashes)

Hello everyone,

Using Haiku x86 (Walter Revision hrev52356), which runs on VirtualBox (with Internet enabled, as web browsers in Haiku can open web sites without problems), I am trying to build a simple app using Qt Creator IDE that just loads a web page using WebKit. I have already installed, through HaikuDepot, all packages needed as Qt5, qtwebkit_x86, Qt creator, etc.

I am using a project on Qt Creator which is “Qt Quick Application” type and I just modify its main.qml. I attach a screenshot showing the source code and the folder structure (it was created by default):
VirtualBox_Haiku%20OS%20-%20Dev%20(x86)_22_09_2018_00_36_18

But as soon as I try to run the project, the app shows its window and crashes as you can see in this screenshot:
EDIT: new users can only use one image, so I will add it to the next post…

The error shown in the “Application Output” of Qt Creator is the following one (it appears twice):

Creation of socket failed with errno: -2147454955

The errors are caused because of the presence of the “WebView { … }” block in the code since when it is removed the errors disappear. But I need that block in order to load the web site which is the main purpose of this simple app.

Instead of using a “Qt Quick Application” type project (modifying its main.qml file), I also tried to accomplish the same with another “Qt Widgets Application” (desktop) type project (modifying its mainwindow.cpp file) but I was not succeed either. The problem in this case, I guess, is that I cannot figure out how to link the libQt5WebKit.so library which is in the “/boot/system/lib/x86/” folder (I tried adding a library through the menus of Qt Creator but its path appears in red colour so it does not like it and I cannot press “Next” on the wizard for adding libraries… I also tried to copy the library to another folder with the same result or even tried many “#include” clauses but none found this WebKit library or any other ones used in examples all over the Internet). By the way, the form designer (opened by clicking on the “mainwindow.ui” file) does not show anything related to WebKit on the “Display Widgets” section (this is the first thing I tried!) or anywhere else.

Does anyone please know how to solve this problem or at least how to accomplish the same easier? I just want to create an app for Haiku with Qt that loads a web site online. I would like that the app included the web engine itself and did not relay on the system’s web browser installed, that is why I want to use the “qtwebkit_x86” library for Qt5.

Thank you very much in advance.

Best regards,
Joan

Please add the screenshot.

The error shown in the “Application Output” of Qt Creator is the following one (it appears twice):
VirtualBox_Haiku%20OS%20-%20Dev%20(x86)_22_09_2018_00_38_01

I know about this problem. The reason is that QML uses WebKit2 for render pages. Usual Qt applications use WebKit1. For communication between processes in WebKit2 used a socketpair, but they are not implemented in haiku for how.

Hello again,

Thank you very much for your replies!

Is there any way to use WebKit1 in Qt on Haiku? Or any other way to use any web rendering engine with Qt to make an app that opens a window containing a web site?

Cheers,
Joan

Please, is there anyone who knows how to use Qt (maybe without Qt Creator) on Haiku to use a web site inside an app?