Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved Autosize children of a QFrame

    General and Desktop
    qframe size width
    2
    2
    616
    Loading More Posts
    • 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.
    • McLion
      McLion last edited by

      Hi
      I have a QFrame that contains some QLabel's.
      The width of the frame is set variable based on the content of one of the labels - this works as expected.
      The complete frame is animated instead of only shown and hidden, respecting the variable width - works as expected too.

      Is there a way to automatically extend the width of all child labels of the frame to the same, i.e. the current size the frame gets?
      I know I can set this with some lines of codes manually. However, if there is a functionality in Qt that can di this that would be the nicer solution.

      Thanks
      McL

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @McLion last edited by

        @McLion You can use layouts for those labels

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

        1 Reply Last reply Reply Quote 2
        • First post
          Last post