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. How to create a button on the title bar using Qtcreator?
Forum Updated to NodeBB v4.3 + New Features

How to create a button on the title bar using Qtcreator?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 477 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.
  • H Offline
    H Offline
    himanshu chauhan
    wrote on last edited by
    #1

    I want to create a button named as "Log Out" in the title bar in the rightmost corner of the application.

    jsulmJ 1 Reply Last reply
    0
    • H himanshu chauhan

      I want to create a button named as "Log Out" in the title bar in the rightmost corner of the application.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @himanshu-chauhan I don't think you can do that with Qt, unless you implement your own title bar (title bar is handled by the OS window manager, not Qt).
      Also, this would be unusual: why do you want to put a button in the title bar?

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

      1 Reply Last reply
      1
      • H Offline
        H Offline
        himanshu chauhan
        wrote on last edited by
        #3

        Ok thanks.
        If I ever had multiple users than I can just make use of that logout button.

        jsulmJ 1 Reply Last reply
        0
        • H himanshu chauhan

          Ok thanks.
          If I ever had multiple users than I can just make use of that logout button.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @himanshu-chauhan Yes, but this button does not have to be in the title bar :-)
          There are applications putting UI controls into title bar (like Firefox), but most don't do this.
          You would either have to use native APIs or implement the title bar by yourself.

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

          1 Reply Last reply
          2

          • Login

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