码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2015-12-15 18:13:14      阅读:795      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!