First attempt at safe virtual overrides
[lqt/mk.git] / test / webview.lua
blob8fcd336f236f5189ffbd7812a2109c32928368eb
1 #!/usr/bin/lua
3 require'qtcore'
4 require'qtgui'
5 require'qtwebkit'
7 local app = QApplication(1 + select('#', ...), {arg[0], ...})
9 local address = tostring(arg[1])
11 if address == 'nil' then
12 address = 'www.lua.org'
13 end
15 print('Loading site '..address..' ...')
17 local webView = QWebView()
18 webView:connect('2loadFinished(bool)', function()
19 print('Loaded', webView:url():toEncoded())
20 end)
21 webView:setUrl(QUrl("http://" .. address))
22 webView:show()
24 app.exec()