From qt.webkit to gt.webview problem
Posted
#1
(In Topic #1452)
Administrator



As this component is deprecated and we're not even able to package it anymore on debian 13 (upcoming new stable) I decided it's time to move to qt5.webview instead.
When I changed the component from qt5.webkit to qt5.webview, the newly provided WebView control appeared to be another beast than the previous one.
In qt5.webkit this is what I do to load a markdown file, convert it to html and show it in a WebView control (provided by qt5.webkit)
With WebView control provided by qt5.webview this part doesn't work anymore:
Code (gambas)
- WebView1.HTML = sContent
And I can't seem to find it's equivalent (if that even exists)
How do I get my converted file (in sContent) to show in my WebView?
Documentation is so bad for this, even at the most basic level of explaining a property, event or the likes.
Been reading wiki over and over again, trying, reading some more wiki and so on…
Again, this is going to be something stupid easy I overlooked…
Added is the toy to play with using qt5.webkit. You'll need to change to qt5.webview to see what goes wrong:
Enjoy…
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
Posted
Banned
Code (gambas)
- WebView1.SetHtml(sContent)
Posted
Administrator



BruceSteers said
WebView has methods SetHtml() and GetHtml()
Funny thing is I tried:
Code (gambas)
- WebView1.GetHtml(sContent)
The inline help and wiki only says: 'Symbol does not exist' if looking for some clarification.
So, how the hell do I know what I can do with it other that try different possible combinations, or dive into the source code.
The same 'Symbol does not exist' is shown for SetHtml, so I never even tried it after trying GetHtml. A rather stupid decision from me in retrospective.
A matter of adding 2 single quotes above the method in source code (if written in Gambas, I didn't check) like this:
'The symbol does not exist' is not the correct sentence here and very misleading info as it does exist, just lacks the 2 single quotes before the method that auto generates wiki content for the symbol (unless it's written in C, then I don't know how wiki content get's auto generated)
Anyway,
thank you very much Bruce
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
Posted
Banned
Ie.
Dim sPageHtml As String = WebView1.GetHtml()
"Symbol does not exist" looks like a wiki bug. It shouldn't really be trying to find Control.SetHtml it should be specifically looking for WebView.SetHtml
Posted
Banned
BruceSteers said
"Symbol does not exist" looks like a wiki bug. It shouldn't really be trying to find Control.SetHtml it should be specifically looking for WebView.SetHtml
or just page missing.
I just went to the page , logged in, selected "create" that shows the default…
<HIGHLIGHT highlight="html">@{syntax}
@{help}
</HIGHLIGHT>
Hit save and now there's a page.
I requested to Benoit that the wiki automatically show the default page (syntax/help) if no page exists.
I guess it's still not so.
Posted
Administrator



I've seen what you mean. I have logged in today and I have done above for all the missing WebView symbols, so at least it makes some sense when typing code in IDE.BruceSteers said
I just went to the page , logged in, selected "create" that shows the default…
<HIGHLIGHT highlight="html">@{syntax}
@{help}
</HIGHLIGHT>
Hit save and now there's a page.
I requested to Benoit that the wiki automatically show the default page (syntax/help) if no page exists.
I guess it's still not so.
I've seen that a lot more components seem to have this problem. Wiki can auto generate them if the proper code for inserting the info is not missing. And that seems to be the problem.
I might be at it, now and then, for those I encounter missing when using them, but better would be when Benoit fixes it.
Should it maybe be reported as a bug, to get some results?
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
1 guest and 0 members have just viewed this.



