qmenu black mark in corner . how to remove it
Moved
Unsolved
Qt for Python
-
at the bottom right corner there is a black mark in QMenu .is it related to shadow. how can i remove it.
below is my code.def show_context_menu(self, pos): index = self.tabBar().tabAt(pos) if index == -1: return # No tab at this position context_menu = QMenu() context_menu.setStyleSheet(f""" QMenu {{ background-color: #ffffff; border: 1px solid {self.__style.Qmenuborder_color}; border-radius: 5px; padding: 5px; }} QMenu::item {{ padding: 5px 15px; border-radius: 5px; }} QMenu::item:selected {{ background-color: {self.__style.Qmenu_selection_color}; color: white; }} """) close_action = QAction(QIcon(getpath("close.png")), "close tab", self) close_action.triggered.connect(lambda: self._myTab__close_tab(index)) context_menu.addAction(close_action) info_action = QAction(QIcon(getpath("close_red.png")), "show info", self) info_action.triggered.connect(lambda: QMessageBox.information(self, "Tab Info", f"You clicked on Tab {index + 1}")) context_menu.addAction(info_action) context_menu.exec(self.tabBar().mapToGlobal(pos))
-
S SGaist moved this topic from General and Desktop
-
Hi,
Which OS are you on ?
Which version of PySide/PyQt are you using ?
Can you provide a minimal script that allows run your code ? -
iam using windows 11
using pyside6here is script https://github.com/its-me-abilash/pysideTab/blob/main/api/customtabwidget.py
the Qmenu is in "WithContextMenu" class
-
sorry my github account got spammy status. here is another link
https://gist.github.com/its-me-abi/e0c3d69b3f96d17b983d508fad8f00fc
-
@abiabi
Check this stack overflow post please
https://stackoverflow.com/questions/65574567/rounded-corners-for-qmenu-in-pyqt