⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

how to set window title to the centre?

  • 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.

  • @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

Log in to reply