Time:09-25
CodePudding user response:
QT the cabin and baidu example
it depends on how you want, according to the basic idea is to make the image size and window size consistent, at least signal QSS groove, rewrite window size change event, two methods to QML wide high fill can put the pictures into the window (control) wide higher, many methods, and is the foundation, basic tutorial is some, if even the tutorial to find...
QPixmap p (path); Loading images Lb QLabel *=new QLabel; Create a label Lb - & gt; The resize (w, h); Settings you want to show that the width of high Lb - & gt; SetPixmap (p. cale (w1, h1)); Zoom pictures to show size Qt Qt Document into the website to view, use baidu said very detailed,
Quote: refer to the third floor lishadowl response: it depends on how you want, according to the basic idea is to make the image size and window size consistent, at least signal QSS groove, rewrite the window size change event, two methods to QML wide high fill can put the pictures into the window (control) wide higher, many methods, and is the foundation, basic tutorial is some, if even the tutorial to find... This really can't find the tutorial , suddenly the teacher to learn qt, then no matter, don't know this thing before,
it depends on how you want, according to the basic idea is to make the image size and window size consistent, at least signal QSS groove, rewrite the window size change event, two methods to QML wide high fill can put the pictures into the window (control) wide higher, many methods, and is the foundation, basic tutorial is some, if even the tutorial to find...
Page link:https//www.codepudding.com/Mobile/30820.html