简体   繁体   中英

Add QWidget or other QWidget derived controls into QWindow

QtGUI and QtWidgets have been separated in Qt5.

How can I add QWidget or other QWidget derived controls into QWindow ?

A QWindow is not meant to be used that way. Instead of using a QWindow directly, you need a QWidget instead. A parentless QWidget by default becomes a top-level window.

If you have a particular reason to use a QWindow , you'll have to edit your question to provide details on your design; most likely your design is incorrect.

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