Ubuntu – How to change window opacity dynamically in Python and Quickly

application-developmentgladegtkpythonquickly

The app is written in HTML and is running using webkit and Quickly.
The opacity can be changed using Glade.

I want to add a slider functionality in HTML which will change the title of the HTML document according to the opacity.

How to code the main app/AppWindow.py so that it will change the opacity dynamically according to the HTML document title?

Best Answer

You can use the set_opacity() method of GtkWindow object.

It will expect a float, so you should do a type conversion before.

try:
    self.set_opacity(float(title))
except ValueError:
    pass  # Do something with the invalid value here.
Related Question