PyQt and Bespin (KDE style)
What tab widget decorate by Bespin Tabs? I t开发者_如何学JAVAried QTabWidget, QTabBar, KTabWidget, KTabBar, bau no effect. What Im doing wrong? All KDE apps and SMPlayer decorate by Bespin, but acetoneiso and PyQt apps have regular tabs=(
I mean this Bespin: http://kde-look.org/content/show.php/Bespin?content=63928
That is a bit strange. It should have automatically decorated your application with the style Bespin. However you can force it decorate the application with a specific style.
# Check the available styles with qt
sf = QStyleFactory()
print list( sf.keys() )
That should list all the style Qt can render. If Bespin is not listed then, there might be a problem with the installation. To force your application to use the Bespin style ( assuming its available ):
qApp.setStyle( sf.create( "Bespin" ) )
Or say, if you want just one widget to be decorated by Bespin, then, you may do this:
w = QWidget()
w.setStyle( sf.create( "Bespin" ) )
精彩评论