QDockWidget
我该如何添加QFrame
?因为QFrame没有addDockWidget
!!!
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys
app = QApplication( sys.argv )
qmainwin = QFrame()
#qmainwin.setWindowFlags(Qt.FramelessWindowHint)
s = QWidget()
vboxlayout = QVBoxLayout( )
spin1 = QSpinBox()
vboxlayout.addWidget( spin1 )
spin2 = QSpinBox()
vboxlayout.addWidget( spin2 )
s.setLayout( vboxlayout )
qdock = QDockWidget( )
qdock.setWindowFlags(Qt.FramelessWindowHint)
qdock.setWidget( s )
qmainwin.addDockWidget( Qt.TopDockWidgetArea, qdock )
qmainwin.show()
app.exec_()