gtk3.webview problem

Post

Posted
Rating:
#51
Regular
rj71 is in the usergroup ‘Regular’
 Ubuntu 24 vm: HtmlView = Nope!
gtk3 webview = works just fine, no black screen and I can see the web page.


EDIT: this has Gambas 3.19.0
Online now: No Back to the top

Post

Posted
Rating:
#52
Banned
I do not think HtmlView is the component you are looking for.

based on the litehtml readme  https://github.com/litehtml/litehtml

WebView would be the one :)
Online now: No Back to the top

Post

Posted
Rating:
#53
Regular
rj71 is in the usergroup ‘Regular’

BruceSteers said

I do not think HtmlView is the component you are looking for.

based on the litehtml readme  https://github.com/litehtml/litehtml

WebView would be the one :)
Thanks Bruce but my OP was about the webview component. gbWilly suggested Htmlview while helping me troubleshoot the webview issues I was having.
Online now: No Back to the top

Post

Posted
Rating:
#54
Banned

rj71 said

Thanks Bruce but my OP was about the webview component. gbWilly suggested Htmlview while helping me troubleshoot the webview issues I was having.

I know , this epic thread has been popcorn worthy ;)

I can't imagine HtmlView does anything online. based on the fact when you add it it does not also add gb.net as a dependency.  if it was capable of anything online i would think gb.net would also have to add itself.

So i think it is only an offline html viewer.

I think .Url is misleading , .Path would make more sense.
I've asked on the M/L about HtmlView and getting online Urls , if it's not for online stuff I'll add some info to the HtmlView wiki page to better explain it's purpose :)
Online now: No Back to the top

Post

Posted
Rating:
#55
Regular
rj71 is in the usergroup ‘Regular’

BruceSteers said

rj71 said

Thanks Bruce but my OP was about the webview component. gbWilly suggested Htmlview while helping me troubleshoot the webview issues I was having.

I know , this epic thread has been popcorn worthy ;)

I can't imagine HtmlView does anything online. based on the fact when you add it it does not also add gb.net as a dependency.  if it was capable of anything online i would think gb.net would also have to add itself.

So i think it is only an offline html viewer.

I think .Url is misleading , .Path would make more sense.
I've asked on the M/L about HtmlView and getting online Urls , if it's not for online stuff I'll add some info to the HtmlView wiki page to better explain it's purpose :)
I was wondering if it's an offline viewer. When I get a minute I'll experiment and see if it just loads a local html file. As for the original webview issue I was having…I'm just going to assume there is something about old Apple machines (2008-2010 ish) that just don't like the webview component *shrug*
Online now: No Back to the top

Post

Posted
Rating:
#56
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’

BruceSteers said

I know , this epic thread has been popcorn worthy ;)
:lol:

BruceSteers said

So i think it is only an offline html viewer.

I think .Url is misleading , .Path would make more sense.
I've asked on the M/L about HtmlView and getting online Urls , if it's not for online stuff I'll add some info to the HtmlView wiki page to better explain it's purpose :)
That's what I was starting to think myself. But after working with qt4.webkit (many moons ago) and qt5.webview, both having url property, things can get confusing.
And the fact that my 3.18.4 install errored didn't contribute to solving the mystery as it was totally not related in the end  ;)

I wonder what Benoit has to say and matters can be clarified.

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!
Online now: Yes Back to the top

Post

Posted
Rating:
#57
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’

rj71 said

 As for the original webview issue I was having…I'm just going to assume there is something about old Apple machines (2008-2010 ish) that just don't like the webview component *shrug*
I'm leaning to the same conclusion…
And on those old Apples, for now (runninhg Debian12) you could use the qt webkt, as that seemed to work (if I remember correctly)

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!
Online now: Yes Back to the top

Post

Posted
Rating:
#58
Regular
rj71 is in the usergroup ‘Regular’

gbWilly said

rj71 said

 As for the original webview issue I was having…I'm just going to assume there is something about old Apple machines (2008-2010 ish) that just don't like the webview component *shrug*
I'm leaning to the same conclusion…
And on those old Apples, for now (runninhg Debian12) you could use the qt webkt, as that seemed to work (if I remember correctly)

Yes the qt webkit worked on both the problem apple machines but as you said it won't be included in Trixie so I'm either stuck with Bookworm forever on these 2 or I just experiment with other possible solutions.
Online now: No Back to the top

Post

Posted
Rating:
#59
Regular
rj71 is in the usergroup ‘Regular’
Well look at this…gb.qt6 and gb.qt6.webview on the old iMac:

App loads I get this:
Image

(Click to enlarge)


But then I resize the form with the mouse I get:
Image

(Click to enlarge)


 :lol: wtf
Online now: No Back to the top

Post

Posted
Rating:
#60
Regular
rj71 is in the usergroup ‘Regular’
Here's what happens to my movie app when I switch to QT (gb.qt6 and gb.qt6.webview that apparently works with the old iMac and I assume would work on the problematic mac mini) and why I prefer gtk.
1 -  The Watch Movie button is a different red
2 - Below the Watch Trailer button there are 9 panels each with a picturebox and a transparent button that act as a menu that are supposed to download from my media server using httpclient as soon as the app is launched. I get no errors but where are they?
Possibly a problem with having the button transparent? EDIT: I don't think this is the problem
Image

(Click to enlarge)


Here is what it looks like with GTK3:
This is what the 9 buttons look like.
Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#61
Regular
rj71 is in the usergroup ‘Regular’
 The qt6 seems to mess up a lot of images in my app. It makes it difficult to navigate using the keypress events. I was excited when I saw qt6 webview worked on the old iMac but what it's doing to my app makes me not want to use it.
Online now: No Back to the top

Post

Posted
Rating:
#62
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’

rj71 said

Here's what happens to my movie app when I switch to QT (gb.qt6 and gb.qt6.webview that apparently works with the old iMac and I assume would work on the problematic mac mini) and why I prefer gtk.
1 -  The Watch Movie button is a different red
2 - Below the Watch Trailer button there are 9 panels each with a picturebox and a transparent button that act as a menu that are supposed to download from my media server using httpclient as soon as the app is launched. I get no errors but where are they?
Possibly a problem with having the button transparent?
If you design for running it on qt6 best fiddle with properties from IDE using qt6 to figure out what might be causing the problem. Transparency usually works on qt6 not gtk3 (I believe, but not sure as I left gtk2 for qt4 long ago, because qt4 always worked better, even on gtk desktops  :o ). I stuck to qt over time, to go back with GambOS Dashboard for 1 test run and be back on qt5 in my case, really fast. Transparency on qt5 works fine on my system as I use it in several of my applications. It worked fine on qt4 and I guess it's fine for qt6.

So, if it works on qt6  or qt5 (even on older ones), then go for that as solution. Simple as that.  ;)

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!
Online now: Yes Back to the top

Post

Posted
Rating:
#63
Regular
rj71 is in the usergroup ‘Regular’

gbWilly said

rj71 said

Here's what happens to my movie app when I switch to QT (gb.qt6 and gb.qt6.webview that apparently works with the old iMac and I assume would work on the problematic mac mini) and why I prefer gtk.
1 -  The Watch Movie button is a different red
2 - Below the Watch Trailer button there are 9 panels each with a picturebox and a transparent button that act as a menu that are supposed to download from my media server using httpclient as soon as the app is launched. I get no errors but where are they?
Possibly a problem with having the button transparent?
If you design for running it on qt6 best fiddle with properties from IDE using qt6 to figure out what might be causing the problem. Transparency usually works on qt6 not gtk3 (I believe, but not sure as I left gtk2 for qt4 long ago, because qt4 always worked better, even on gtk desktops  :o ). I stuck to qt over time, to go back with GambOS Dashboard for 1 test run and be back on qt5 in my case, really fast. Transparency on qt5 works fine on my system as I use it in several of my applications. It worked fine on qt4 and I guess it's fine for qt6.

So, if it works on qt6  or qt5 (even on older ones), then go for that as solution. Simple as that.  ;)
I'll start a new project with qt6 and copy over some of the movie app code and see what happens. I didn't have any transparency issues with this app, every image in my screenshot has a transparent button over it except for the movie poster at the top. Even though the qt6 works on the imac, it has a strange quirk though….have to resize the form for it to work right….weird.
Online now: No Back to the top

Post

Posted
Rating:
#64
Avatar
Administrator
sholzy is in the usergroup ‘unknown’
 Resizing a form causes the form to redraw the contents. I haven't looked at the WebView. Is there a way to force a refresh of the form either just before or just after?

sholzy
Gambas One Site Director

To report bugs in the Gambas IDE:
Official Gambas Bug Tracker
Online now: No Back to the top

Post

Posted
Rating:
#65
Regular
rj71 is in the usergroup ‘Regular’

sholzy said

Resizing a form causes the form to redraw the contents. I haven't looked at the WebView. Is there a way to force a refresh of the form either just before or just after?
me.refresh didn't work but this with a timer did:

Code (gambas)

  1. Me.FullScreen = True
  2.   Wait 1.5
  3.   Me.FullScreen = False
  4.   Wait 1.5
  5.   Me.Width = Screen.Width
  6.   Me.Height = Screen.Height
  7.  

I'm sure that can be tinkered with
Online now: No Back to the top

Post

Posted
Rating:
#66
Regular
rj71 is in the usergroup ‘Regular’

rj71 said

Here's what happens to my movie app when I switch to QT (gb.qt6 and gb.qt6.webview that apparently works with the old iMac and I assume would work on the problematic mac mini) and why I prefer gtk.
1 -  The Watch Movie button is a different red
2 - Below the Watch Trailer button there are 9 panels each with a picturebox and a transparent button that act as a menu that are supposed to download from my media server using httpclient as soon as the app is launched. I get no errors but where are they?
Possibly a problem with having the button transparent? EDIT: I don't think this is the problem
Screenshot at 2025-05-23 14-44-24.png

Here is what it looks like with GTK3:
This is what the 9 buttons look like.
Screenshot at 2025-05-23 14-49-37.png

I see why those 9 buttons are blank. Must be a qt6 thing but a transparent button with border set to true makes the whole button black. Not the case with gtk, transparent button can have border set to true and still be transparent. Also that button looks more like pink than the red it is set to.
Online now: No Back to the top

Post

Posted
Rating:
#67
Banned
I have found a number of things can not display properly before a window is actually already opened.

Possible Solutions…

Use Form_Show not Form_Open
(be careful because Form_Show may fire again if for example you minimize then restore a window)

Code (gambas)

  1. Private $bInitiated As Boolean
  2.  
  3. Public Sub Form_Show()
  4.  
  5.   Wait 0.1  ' allow event loop to cycle to create window.
  6.  
  7.   If Not $bInitiated Then
  8.     WebView1.Url = "https://forum.gambas.one/viewtopic.php?t=2113"
  9.     $bInitiated = True
  10.  
  11.  

Use a timer

Code (gambas)

  1. Private $hStartTimer As New Timer As "StartTimer"
  2.  
  3. Public Sub Form_Open()
  4.  
  5.   $hStartTimer.Delay=0
  6.   $hTimer.Start
  7.  
  8.  
  9. Public Sub StartTimer_Timer()
  10.  
  11.   Wait 0.1 ' not sure if needed but good to let event loop cycle.
  12.   WebView1.Url = "https://forum.gambas.one/viewtopic.php?t=2113"
  13.  
  14.  

New possible option.
Benoit has added a new syntax "After Do" that performs a command "after" the event loop has cycled and should handle things like this

Code (gambas)

  1.  
  2. Public Sub Form_Open()
  3.  
  4.   After Do WebView1.Url = "https://forum.gambas.one/viewtopic.php?t=2113"
  5.  
  6.  
  7.  
Online now: No Back to the top

Post

Posted
Rating:
#68
Regular
rj71 is in the usergroup ‘Regular’
 Thanks for everyone's help! I think all the problems with the first gen mac mini and the iMac it's probably just a good idea to remove the mac mini from the movie/streaming app project and maybe turn it into a glorified picture frame. But since I love the iMac so much I'll still use it for building Gambas apps, I'll just keep in mind the webview issues. I got a birthday coming up so I think I'll treat myself to a new Raspberry Pi 5 which I think would be great for this movie/streaming project. I believe I read that rpi 5 can handle HD…I think.
Online now: No Back to the top

Post

Posted
Rating:
#69
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’

rj71 said

Thanks guys. gbWilly, I will try the OSB on a spare laptop running Deb 12 and report back how it went. Probably later today.. BTW, what is GambOS that you're working on??
OK

On GambOS:
You could start here on the forum with the oldest post in the GambOS subforum: https://forum.gambas.one/viewforum.php?f=33
Or you could checkout my GambOS project page on gitlab: https://gitlab.com/gbWilly/gambos

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!
Online now: Yes Back to the top

Post

Posted
Rating:
#70
Regular
rj71 is in the usergroup ‘Regular’

gbWilly said

rj71 said

Thanks guys. gbWilly, I will try the OSB on a spare laptop running Deb 12 and report back how it went. Probably later today.. BTW, what is GambOS that you're working on??
OK

On GambOS:
You could start here on the forum with the oldest post in the GambOS subforum: https://forum.gambas.one/viewforum.php?f=33
Or you could checkout my GambOS project page on gitlab: https://gitlab.com/gbWilly/gambos

Thanks! Bookmarked and I will enjoy following the progress of GambOS!
Online now: No Back to the top
1 guest and 0 members have just viewed this.