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. Custom Window Buttons

Custom Window Buttons

Scheduled Pinned Locked Moved Unsolved Qt for Python
pysideqt for pythonpythonpyside2
2 Posts 2 Posters 311 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.
  • D Offline
    D Offline
    Developer_Boys89
    wrote on 10 May 2024, 03:34 last edited by
    #1

    I have created a curve window class obj i want to add custom close,min,etc. buttons :-

    class CurveWindow(BaseWidgetWindow):
        def __init__(self,w,h,color:tuple,roundness=50):
            super().__init__()
            self.setWindowFlag(Qt.FramelessWindowHint)
            self.setAttribute(Qt.WA_TranslucentBackground)
            self.rounded_widget=QWidget(self)
            self.rounded_widget.resize(w,h)
            self.resize(w,h)
            self.rounded_widget.setStyleSheet(f"""
                background:rgb({color[0]},{color[1]},{color[2]});
                border-radius: {roundness}px;
                """
            )
    

    how to add custom btn that come top to menu bar also

    1 Reply Last reply
    0
    • J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 10 May 2024, 05:36 last edited by
      #2

      It is not really clear what exactly you did. What is BaseWidgetWindow?
      If you're imnplementing a custom title bar then take a look at https://github.com/imitatehappiness/QtCustomTitleBar

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      10 May 2024, 03:34

      • Login

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