No ActiveX - what about QWebView
Moderator: Rathinagiri
No ActiveX - what about QWebView
Because HbQT is platform independend we have no ActiveX anymore.
To show the content of a website QT offers the the QWebView Class but who will implement it into HMG4 ?
To show the content of a website QT offers the the QWebView Class but who will implement it into HMG4 ?
Re: No ActiveX - what about QWebView
Ricci wrote:Because HbQT is platform independend we have no ActiveX anymore.
To show the content of a website QT offers the the QWebView Class but who will implement it into HMG4 ?
Try to use directly the Qt classes...
- bedipritpal
- Posts: 122
- Joined: Thu Sep 02, 2010 10:47 pm
Re: No ActiveX - what about QWebView
QtWebKit library is completely implemented in Harbour.
You need to devise the commands per HMG methodology
or use the classes as per Qt standards.
You need to devise the commands per HMG methodology
or use the classes as per Qt standards.
enjoy hbIDEing... Pritpal Bedi
Re: No ActiveX - what about QWebView
Thank you. Some small lines how to do it?
- bedipritpal
- Posts: 122
- Joined: Thu Sep 02, 2010 10:47 pm
Re: No ActiveX - what about QWebView
Ricci wrote:Thank you. Some small lines how to do it?
Code: Select all
FUNCTION Build_HTMLViewer( oWnd )
LOCAL oFrm, oHtm, sz_:= oWnd:currentSize()
oFrm := XbpStatic():new( oWnd, , {5,5}, {sz_[1]-5-10,sz_[2]-30-7} )
oFrm:type := XBPSTATIC_TYPE_RECESSEDBOX
oFrm:options := XBPSTATIC_FRAMETHICK
oFrm:create()
#ifdef __HARBOUR__
//oFrm:setStyleSheet( "border: 2px solid yellow;" )
#endif
sz_:= oFrm:currentSize()
// oHtm := XbpHTMLViewer():new( oWnd, , {10,10}, {sz_[1]-25,sz_[2]-30-15} )
oHtm := XbpHTMLViewer():new( oFrm, , {10,10}, {sz_[1]-10-10,sz_[2]-10-10} )
oHtm:create()
oHtm:navigate( "http://harbour-project.org" )
oHtm:titleChange := {|e| HB_SYMBOL_UNUSED( e ) }
RETURN oHtm
OR
Read XBase++ documentation on XbpHTMLViewer class.
A lot more can be done just than viewing web-pages, but that is
the next step in Harbour. You will have to add hbqtwebkit lib in project and
QtWebKit4.dll with run-time.
enjoy hbIDEing... Pritpal Bedi
Re: No ActiveX - what about QWebView
Thank you Pritpal, but maybe this XBP/Harbour staff is a little bit far away from HMG4 for me.
And I didn´t get it working, maybe some .ch files or libs are missing?
- undefined reference to `HB_FUN_XBPSTATIC'
- undefined reference to `HB_FUN_XBPHTMLVIEWER'
And I didn´t get it working, maybe some .ch files or libs are missing?
- undefined reference to `HB_FUN_XBPSTATIC'
- undefined reference to `HB_FUN_XBPHTMLVIEWER'
Re: No ActiveX - what about QWebView
The simple command "web := QWebView()" end into a missing library while compiling, I tried to find the right .hbc file but it never works.mrduck wrote:Try to use directly the Qt classes...Ricci wrote:Because HbQT is platform independend we have no ActiveX anymore.
To show the content of a website QT offers the the QWebView Class but who will implement it into HMG4 ?
Better I forget it .... that´s no fun.
Re: No ActiveX - what about QWebView
Ricci,
use directly QtWebKit... there is hbqtwebkit.hbc in contrib/hbqt directory.
There is a remmed example in contrib/hbqt/tests/demoqt.prg.
I don't know why it is remmed... but you can try...
and since we are in open-source, you may have a look at contrib/hbxbp/xbphtmlviewer.prg and see how Pritpal did it. The code is not difficult and can be ported to HMG4 quite easily (there are no strong ties to xbp...)
What I don't understand is
it seems to me that object creation is disabled....
But I remember that it was deliberately disable because QTWebKit is quite big, and inclusion would grow the exe size a lot...
Pritpal, was this the reason of the #if 0 ?
use directly QtWebKit... there is hbqtwebkit.hbc in contrib/hbqt directory.
There is a remmed example in contrib/hbqt/tests/demoqt.prg.
I don't know why it is remmed... but you can try...
and since we are in open-source, you may have a look at contrib/hbxbp/xbphtmlviewer.prg and see how Pritpal did it. The code is not difficult and can be ported to HMG4 quite easily (there are no strong ties to xbp...)
What I don't understand is
Code: Select all
#if 0 /* Discontinued till QWebKit is integrated separately - Pritpal */
::oWidget := QWebView( ::pParent )
::oWidget:connect( "iconChanged()" , {|p| ::execSlot( "iconChanged()" , p ) } )
::oWidget:connect( "linkClicked(QUrl)" , {|p| ::execSlot( "linkClicked(QUrl)" , p ) } )
But I remember that it was deliberately disable because QTWebKit is quite big, and inclusion would grow the exe size a lot...
Pritpal, was this the reason of the #if 0 ?
Re: No ActiveX - what about QWebView
I took a look into Marinas and found that libqtwebkit4.a was missing in HMG4.
And I had to change hbqt.hbc.
Now I can continue.
web := QWebView()
web.load(QUrl("http://google.de"))
web.show()
It´s still opening 2 windows .... let´s see.
>contrib/hbxbp/xbphtmlviewer.prg
Not in my HMG4
And I had to change hbqt.hbc.
Now I can continue.
web := QWebView()
web.load(QUrl("http://google.de"))
web.show()
It´s still opening 2 windows .... let´s see.
>contrib/hbxbp/xbphtmlviewer.prg
Not in my HMG4
Re: No ActiveX - what about QWebView
QWebView( parent )... perhaps missing parent ???Ricci wrote: Now I can continue.
web := QWebView()
web.load(QUrl("http://google.de"))
web.show()
It´s still opening 2 windows .... let´s see.
Code: Select all
>contrib/hbxbp/xbphtmlviewer.prg
Not in my HMG4[/quote]
it's in harbour... here: http://hg.bruxx.it/hg/harbour-project/file/ffaba8d2e88b/harbour/contrib/hbxbp/xbphtmlviewer.prg