Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWidget, add TitleBar and custom button

QWidget, add TitleBar and custom button

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 7.1k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    blackbelt
    wrote on last edited by
    #1

    Hello Guys, is possibile to customize a QWidget in order to add a Title bar and a custom button?
    Thank you in advance

    1 Reply Last reply
    0
    • M Offline
      M Offline
      moritzg
      wrote on last edited by
      #2

      QDockWidget provides a nice framework for this. If you need extra functionality outside of what the QDockWidget default title bar offers, you can roll your own using setTitleBarWidget().

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        No idea what you want to achieve. All top-level widgets get a title bar automatically. What do you mean by a 'custom button', and where would you like to have it? In the title bar itself, or somewhere else?

        1 Reply Last reply
        0
        • B Offline
          B Offline
          blackbelt
          wrote on last edited by
          #4

          I want to change icon e position of the "x" button. Is that possible?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            No, there is no Qt API do that.

            Having said that:

            • You may be able to use platform depended API, or
            • You could hide the default title bar, and implement your own
            1 Reply Last reply
            0

            • Login

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