简体   繁体   English

如何在PyQt4的QFrame中添加浮动工具栏?

[英]How to add a floating toolbar to QFrame in PyQt4?

I have made a stand alone application inheriting from base class QtGui.QFrame , and now I want to add a floating toolbar to it as can be done in a QMainWindow . 我已经制作了一个QtGui.QFrameQtGui.QFrame独立应用程序,现在我想向其添加一个浮动工具栏,可以在QMainWindow完成。 How should I do it? 我该怎么办?

I think you can't do it with QFrame. 我认为您无法使用QFrame。 According to docs you can have toolbar in allowed areas. 根据文档,您可以在允许的区域中放置工具栏。 http://pyqt.sourceforge.net/Docs/PyQt4/qtoolbar.html#allowedAreas-prop http://pyqt.sourceforge.net/Docs/PyQt4/qtoolbar.html#allowedAreas-prop

But I'm not sure. 但是我不确定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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