How to set main window background transparent on QT? Do I need an attribute or a style?
I've tried setting the opacity, but it didn't work for me.
app.setStyleSheet("QMainWindow {opacity:0}")
You can press the shortcut (ALT+A, which is changeable by clicking the toolbar icon) or you can hover your mouse over the top of a window and click the down arrow that appears, then select "Opacity." WindowTop also has the click-through feature that Peek Through has.
Increase Windows 10 Start Menu Transparency First, use the keyboard shortcut Windows Key + R and type: regedit and hit Enter or click OK. From there, double click on EnableTransparency and change its value from 1 to 0 and click OK. No restart is required.
To Turn On or Off Transparency Effects in Windows 10,Navigate to Personalization > Colors on the left. Turn off or on the toggle option Transparency effects in the right page. You are done.
you must set new attribute for MainWindow object as below:
class Main(QtGui.QMainWindow):
def __init__(self):
self.setAttribute(Qt.WA_TranslucentBackground)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With