首页 > Windows开发 > 详细

QWidget 实现 打破布局 或者 当前窗体内的 弹窗

时间:2015-12-15 18:10:28      阅读:626      评论:0      收藏:0      [点我收藏+]

 

 

but = QtWidgets.QToolButton(Dialog2)
    but.setText(‘**‘)
    but.setAutoRaise(True)
    layout.addWidget(but)
    Dialog2.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool)  
    Dialog2.setWindowOpacity(1)
    Dialog2.setAttribute(QtCore.Qt.WA_TranslucentBackground)

 

 

Qt.Popup     Window    Indicates that the widget is a pop-up top-level window, i.e. that it is modal, but has a window system frame appropriate for pop-up menus.

 

 

Qt.Tool        Indicates that the widget is a tool window. A tool window is often a small window with a smaller than usual title bar and decoration, typically used for collections of tool buttons. If there is a parent, the tool window will always be kept on top of it. If there isn‘t a parent, you may consider using Qt::WindowStaysOnTopHint as well. If the window system supports it, a tool window can be decorated with a somewhat lighter frame. It can also be combined with Qt::FramelessWindowHint. On OS X, tool windows correspond to the Floating class of windows. This means that the window lives on a level above normal windows; it impossible to put a normal window on top of it. By default, tool windows will disappear when the application is inactive. This can be controlled by the Qt::WA_MacAlwaysShowToolWindow attribute.

 

QWidget 实现 打破布局 或者 当前窗体内的 弹窗

原文:http://www.cnblogs.com/ribavnu/p/5048895.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!