Display image in Qt to fit label size

前端 未结 7 1190
[愿得一人]
[愿得一人] 2021-02-01 02:53

I already tried several methods on displaying an image on a form, but none of them works how I would like.

I\'ve read many places that the easiest way is to create a la

相关标签:
7条回答
  • 2021-02-01 03:44

    In Qt Designer, you must set two things:

    1. Set the pixmap as the Image you want
    2. Check scaledContents

    As per image below:

    Here, the label on the bottom is scaledContents checked and the label on the top is not.

    0 讨论(0)
提交回复
热议问题