加载简单代码并在Qt中调整图像大小 [英] simple code for load and resize an image in Qt
本文介绍了加载简单代码并在Qt中调整图像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我想用主窗口构建一个Qt GUI表单,然后用表格中的按钮加载图像,然后将图像调整到高度和用户输入的重量。
我需要在设计模式下将哪些小部件或元素推送到我的表单?我必须在哪里编写我上面提到的那个?
我在Qt真的是新手,而且我正在寻找一个很好的教程!
非常感谢
Hi
I Want to build a Qt GUI form with main window , then load an image with a button in form and then resize the image to the height and weight that the user inputs .
Which widget or elements I need to push to my form in design mode? And where I must coding for that I mentioned above ?
I am really newbie in Qt and also I am looking for a good tutorial for that!
Thanks a lot
推荐答案
Qt网站 [ ^ ],包括视频培训。 />
在基本图像大小调整方面,您可以将QLabel类与QPixmap一起使用,一个简单的例子是这里 [ ^ ]。 QPixmap文档是此处 [ ^ ]。我相信有足够的信息可以用你的形象做你想做的事。
There is a huge amount of material on the Qt web site[^], including video training.
In terms of basic image resizing, you could probably use the QLabel class with QPixmap, a simple example is here[^]. And the QPixmap docs are here[^]. I''m sure there is plenty of information there to do what you want with your image.
这篇关于加载简单代码并在Qt中调整图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文