[英]Add QWidget or other QWidget derived controls into QWindow
QtGUI
and QtWidgets
have been separated in Qt5. QtGUI
和QtWidgets
在Qt5中已分开。
How can I add QWidget
or other QWidget
derived controls into QWindow
? 如何将
QWidget
或其他QWidget
派生的控件添加到QWindow
?
A QWindow
is not meant to be used that way. QWindow
不能以这种方式使用。 Instead of using a QWindow
directly, you need a QWidget
instead. QWindow
直接使用QWindow
,而是需要QWidget
。 A parentless QWidget
by default becomes a top-level window. 默认情况下,无父母的
QWidget
成为顶层窗口。
If you have a particular reason to use a QWindow
, you'll have to edit your question to provide details on your design; 如果由于特殊原因需要使用
QWindow
,则必须编辑问题以提供有关设计的详细信息。 most likely your design is incorrect. 您的设计很可能不正确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.