简体   繁体   中英

PyQt5, Letting Users resize the Widgets

I have developing an app for various different purposes with PyQt5 and it is going very well. I know how to resize a widget (like QLineEidit, or QTextBrowser), however, I would like to know how I would be able to allow the USER to resize these widgets to their liking. I'm sorry that I do not provide any code, I have not fully started this project, I would like to know if what I am trying to do is possible. It would be really helpful if you provided a small chunk of code that does this. Thank you in advance.

I'm not sure what exactly you are asking. You'd usually put your widgets in a layout, and then they resize when the user resizes the window.

You can also use a QSplitter so the user can resize two widgets relative to each other.

If you want the user to be able to resize any widgets in your window: I'm sure that'd be possible somehow, but I don't know how. However, that sounds like a rather bad UI to me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM