Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. qmenu black mark in corner . how to remove it
QtWS25 Last Chance

qmenu black mark in corner . how to remove it

Scheduled Pinned Locked Moved Solved Qt for Python
7 Posts 4 Posters 327 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abiabi
    wrote on 1 Feb 2025, 18:22 last edited by abiabi 2 Jan 2025, 18:37
    #1

    at the bottom right corner there is a black mark in QMenu .is it related to shadow. how can i remove it.
    Screenshot 2025-02-01 232200.png
    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))
    
    1 Reply Last reply
    0
    • S SGaist moved this topic from General and Desktop on 1 Feb 2025, 19:21
    • A abiabi
      3 Feb 2025, 13:46

      sorry my github account got spammy status. here is another link

      https://gist.github.com/its-me-abi/e0c3d69b3f96d17b983d508fad8f00fc

      J Offline
      J Offline
      Jaime02
      Qt Champion 2021
      wrote on 4 Feb 2025, 10:39 last edited by
      #6

      @abiabi
      Check this stack overflow post please
      https://stackoverflow.com/questions/65574567/rounded-corners-for-qmenu-in-pyqt

      1 Reply Last reply
      1
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 1 Feb 2025, 19:23 last edited by
        #2

        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 ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • A Offline
          A Offline
          abiabi
          wrote on 2 Feb 2025, 08:39 last edited by abiabi 2 Feb 2025, 08:42
          #3

          iam using windows 11
          using pyside6

          here is script https://github.com/its-me-abilash/pysideTab/blob/main/api/customtabwidget.py

          the Qmenu is in "WithContextMenu" class

          P 1 Reply Last reply 2 Feb 2025, 13:57
          0
          • A abiabi
            2 Feb 2025, 08:39

            iam using windows 11
            using pyside6

            here is script https://github.com/its-me-abilash/pysideTab/blob/main/api/customtabwidget.py

            the Qmenu is in "WithContextMenu" class

            P Offline
            P Offline
            Pl45m4
            wrote on 2 Feb 2025, 13:57 last edited by
            #4

            @abiabi

            The repo / user name doesn't exist


            If debugging is the process of removing software bugs, then programming must be the process of putting them in.

            ~E. W. Dijkstra

            1 Reply Last reply
            0
            • A Offline
              A Offline
              abiabi
              wrote on 3 Feb 2025, 13:46 last edited by
              #5

              sorry my github account got spammy status. here is another link

              https://gist.github.com/its-me-abi/e0c3d69b3f96d17b983d508fad8f00fc

              J 1 Reply Last reply 4 Feb 2025, 10:39
              0
              • A abiabi
                3 Feb 2025, 13:46

                sorry my github account got spammy status. here is another link

                https://gist.github.com/its-me-abi/e0c3d69b3f96d17b983d508fad8f00fc

                J Offline
                J Offline
                Jaime02
                Qt Champion 2021
                wrote on 4 Feb 2025, 10:39 last edited by
                #6

                @abiabi
                Check this stack overflow post please
                https://stackoverflow.com/questions/65574567/rounded-corners-for-qmenu-in-pyqt

                1 Reply Last reply
                1
                • A Offline
                  A Offline
                  abiabi
                  wrote on 10 Feb 2025, 16:46 last edited by
                  #7

                  thanks it works closely but not perefect solution because few black pixels are still visible in edges.but its negligible

                  image.png

                  1 Reply Last reply
                  1
                  • A abiabi has marked this topic as solved on 10 Feb 2025, 17:03

                  5/7

                  3 Feb 2025, 13:46

                  • Login

                  • Login or register to search.
                  5 out of 7
                  • First post
                    5/7
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved