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. My QFrame widget is not well center-aligned
Forum Updated to NodeBB v4.3 + New Features

My QFrame widget is not well center-aligned

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 234 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.
  • 1 Offline
    1 Offline
    1XU7
    wrote on last edited by
    #1

    Hello!

    I'm facing some confusions about how Policies and Sizes work, i have isolated my code so i can reproduce the question in an attachment picture, it is self-explanatory.

    Aditional to this, i noticed that image does not stretchs when i set QSize to bigger or lower, its looks like only the frame is resizing..

    foroQt_pregunta.png

    Thanks in advance.

    Axel SpoerlA 1 Reply Last reply
    0
    • 1 1XU7

      Hello!

      I'm facing some confusions about how Policies and Sizes work, i have isolated my code so i can reproduce the question in an attachment picture, it is self-explanatory.

      Aditional to this, i noticed that image does not stretchs when i set QSize to bigger or lower, its looks like only the frame is resizing..

      foroQt_pregunta.png

      Thanks in advance.

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @1XU7
      The label's text is left-aligned by default.
      This line will fix the issue:
      lblTitle->setAlignment(Qt::AlignCenter);

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      3

      • Login

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