Qtweb tutorial issue


ROOT Version: v6-34-00-patches
Platform: Ubuntu22.04.2 LTS
Compiler: gcc 11.4.0


When I used Qt5.15.3 to compile ROOT and qtweb tutorial, there were no problems, but when I used Qt5.14.2 to compile ROOT and qtweb tutorial, it worked. But there are no graphs displayed inside RCanvasWidget and TCanvasWidget in the example widget. Is this because qtweb does not support Qt5.14.2?
p.s:I’m using a company computer, so I’m sorry I can’t take screenshots and attach any images

Hi,

With ROOT 6.34 you have to use Qt6.
In latest ROOT qt5web plugin works only for very special use-cases and will be discontinued soon.

Regards,
Sergey

Thanks for your answer!
I tried again with root6.26.16, but the same thing happened. When compiled with Qt5.15.3, RCanvasWidget and TCanvasWidget can display the graph normally in the example widget, but when compiled with Qt5.14.2, RCanvasWidget and TCanvasWidget are blank in the example widget.

Hi,

ROOT 6.26 can be too old - it was first version where qtweb plugin was introduced.
If you really need qt5 - you can try to use ROOT 6.32.
Only very special use case still works with qt5 and recent ROOT.

Regards,
Sergey

Thanks for your answer!
I tried root 6.32.08 again and I still get the same issue with Qt5.14.2.

Hi,

Since approx 4 years I personally using Qt 5.15 and did not test older Qt versions for a while.
But I remember that with ROOT 6.16 when qt5web was developed I did testing with earlier Qt versions like Qt 5.8.

You can try to enable debug output for the JavaScript console,
adding following line to .rootrc file:

WebGui.Console: 1

I did not expect much information there - while all failures anyway printed to the standard output.
But you can try and post output here.

I simply recommend to switch to Qt6 - while it is the only Qt version with recent chromium code.

Regards,
Sergey

Thanks,

I added the following line to system.rootrc file,
WebGui.Console: 1
but nothing seem to have changed.

How can I enable debug output for the JavaScript console?

Hi,

WebGui.Console: 1

After this change qt5/qt6 plugin should printout JavaScript console output in application standard output. It cannot solve your problem - but may give a hint that happens.

You do not need to modify system.rootrc file, you can create .rootrc file in directory where you starts ROOT.

Regards,
Sergey

Thanks,

I still don’t quite understand where the .rootrc file should be.
I put it in the directory where the qtweb program built and where the ROOT program built(root_install/bin/), but it didn’t seem to work.
In the terminal, I still get the same output as before.

Hi,

.rootrc file must be in directory where qtweb example started.
But again - I do not expect any important information in JavaScript console.

Regards,
Sergey

Thanks,

I tried again.
My qtweb with Qt5.14 just print what comes before the following line.
Info in <TGeoManager::CloseGeometry>: ----------------------modeler ready------------------------
And no more imformation is printed.
But qtweb with Qt5.15 print a lot of imformation like the following line after print that.
rootscheme://root.server1/jsrootsys/modules/core.mjs:38: Set jsroot source_dir to rootscheme://root.server1/jsrootsys/

Hi,

Means there are differences between Qt5.14 and Qt5.15.

I see no reason for extra tests with Qt5.14. Either you use Qt 5.15 or migrate to Qt 6.
Qt5 support will be deprecated in ROOT anyway. See:

Regards,
Sergey

I understand that.
Thanks for your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.