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 Qt: “ResizeEvent” to receive the size of the window and set it to the size of a QLabel

    General and Desktop
    c++ qt c++ qt5.6 qtcreator qt5.4
    3
    4
    1319
    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.
    • H
      hassene last edited by

      Qt/c++: I want to use ResizeEvent to receive the size of the window and set it to the size of a QLabel, in order to make the image stretched and adapted to the window's dimensions.by a left click of the mouse I can resize my window and the image takes a new size. the problem is that I'm new with Qt and I did not found examples of resizeEvent in the net.

      K 1 Reply Last reply Reply Quote 0
      • K
        koahnig @hassene last edited by

        @hassene

        Hi andwelcome to devnet forum

        Somehow you have duplicated your post, please avoid duplication of posts.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply Reply Quote 0
        • H
          hassene last edited by

          Sorry it was unintentional

          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @hassene last edited by

            @hassene
            Hi and welcome
            Is there a reason you simply dont use a layout ?
            To make it autofollow the size of window ?
            if you place a QLabel on a form ( mainwindow.ui) , right click somewhere on
            empty form, and select Layout menu and select layout, the label will follow maniform.
            https://doc.qt.io/qt-5.10/examples-layouts.html

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