Reputation: 185530
I would like to set a particular size for spynner GUI, how can I do that ? (fullscreen)
I know there's QT doc but I don't know any C++
and moreover I need to mix C++
& python
Upvotes: 0
Views: 397
Reputation: 92617
I am not really sure what you mean in your second line, as it doesn't really have anything to do with your question...
"...but I don't know any C++... and I need to mix C++ & python"
No C++ involved here.
If you check out the source code for spynner, and look at the Browser class, you will see that it stores the QWebView widget in an attribute: Browser.webview
. It also says this in the docs as well.
https://github.com/makinacorpus/spynner/blob/master/src/spynner/browser.py#L96
So if you want to maximize the webview window, you just need to call showMaximized()
on it:
browser = spynner.Browser()
browser.debug_level = spynner.DEBUG
browser.create_webview()
browser.show()
# now maximize the webview
browser.webview.showMaximized()
Upvotes: 2