0

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

Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223

1 Answers1

2

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()
jdi
  • 90,542
  • 19
  • 167
  • 203
  • @sputnick: No prob. Its a good thing it was designed to easily expose the underlying widgets. Sure makes it more useful that way. I haven't looked at the code much, but it would also be nice if it could optionally use an existing QApplication in case you want to integrate it with another app – jdi Jun 12 '12 at 22:23