Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. how to set window title to the centre?
Forum Updated to NodeBB v4.3 + New Features

how to set window title to the centre?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 2.7k 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.
  • S Offline
    S Offline
    Sriu1
    wrote on last edited by Sriu1
    #1

    I have set my window title name by
    this->setWindowTitle("Display Unit");
    But this is aligned to left corner,How do I align it at the center and increase the font size when maximized please suggest.

    1 Reply Last reply
    0
    • Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @Sriu1 it looks like something out of control for Qt... see this post for reference, especially regarding font size.
      Regarding centering, you may want to do some manual padding whenever you're about to maximize the window by calculating actual width vs characters in window title by font size

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      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