PySide2 remove QPushButton hover style - python-3.x

i am trying to create a small corner icon on top of an image in Python3.9 using Pyside2 Qt Widgets.
How can i remove the hover style effect?
# Corner button
self.corner_btn = QtWidgets.QPushButton(self, flat=True) # create button
self.corner_btn.setIcon(createIcon("TOP_status_cooked", 50)) # set icon to button
self.corner_btn.setProperty('transparent', True) # make rest of the button transparent
# remove hover style - these do not work
self.corner_btn.setFlat(True)
self.corner_btn.setFocusPolicy(Qt.NoFocus)
self.corner_btn .setStyleSheet("QToolButton::hover{background-color: #ffffff;}")

Related

What is this UI element called and how can I make it with PyQt?

I am using PyQt5. I am refering to the vertical bar that resizes widgets on the screen:

Need to remove windows topbar in tkinter

I need to remove the topbar of a window (the title, icon, resize and close window buttons) without root.overrideredirect(True) because this method will toggle other things that I need too. Is there a different way to remove the topbar with tkinter?
The only way to remove it is with overrideredirect.

Why Graphical effects doesn't change in PyQt5?

I am using PyQt5 and Python3 to write a program.
I am using QGraphicsBlurEffect to make a blur effect on the main widget when a pop up windows is shown.
The problem is that when the popup window is closed the blur effect is still on the main widget and it doesn't show as normal. How can I set it to normal after closing the popup window?(I set the graphicsEffect of mainwindow to None in closing event of popup window but it doesn't change anything).
This is the code:
main widget:
self.blureffect = QGraphicsBlurEffect(self) #defining the effect
def fontpgshow(self): #shows the popup window
self.setGraphicsEffect(self.blureffect) #puts the blur effect on the main widget
#the 3 bottom lines show the popup window
import fontwindow
self.fontpg = fontwindow.fontpage()
self.fontpg.show()
popup window:
def closeEvent(self,event):
event.accept()
#in the bottom lines I set the effect of main window to None
import settingswindow
self.setpg = settingswindow.settingspage()
self.setpg.setGraphicsEffect(None)
I solved my problem by changing the type of the pop up window from QWidget to QDialog and I used self.accept() and self.reject() in the QDialog for sending signals back to the main widget that here it was the setting page. After getting signal I set the graphics effect of the main widget to None and everything is working ok now.

Hide AppBar menu on desktop (large width screens)

I want to show/hide the menu icon (the 3 horizontal bars below) in the AppBar depending on the width of the screen. Is there a directive or a css class that makes this possible?
Fixed this by adding class "mdl-layout--small-screen-only" to the div containing the md-icon in mdl-layout.component.js.

Bitmap Style Designer: different font colors for different button state

I want to create custom window vsf style for my Inno Setup installer, where I need to change buttons font color depending on its state: focused, clicked or hovered.
Is it possible by customizing style in embarcadero Bitmap Style Designer?
I've tried to use TseTextObject as a Button:
But have no luck, as text on the button seems independed:
TseTextObject as a Button and Without button style

Resources