/**************************************************************************** * Qt QGroupBox StyleShe ET border Settings * declaration: * Before Chen Yingchi asked how this effect to do out, checked the information directly to him, he did not * to carry out related tests, now seems to use this function, so again check the data and verify its function * effect. * 2015-12-25 Shenzhen Nanshan Ping Shan village Zengjianfeng ******************************************************* ********************/First, reference documents:1. Qt Style Sheets Examples http://doc.qt.io/qt-4.8/stylesheet-examples.html 2Fix the QT groupbox border in Linux environment does not display the problem http://www.bubuko.com/infodetail-309027.htmlSecond, the solution:1. In the Qgroupbox control right-click;2. Select Change StyleSheet ... tab;3. Enter in the text box (you can quickly add attributes via the Add Resource, add Gradient, add Color, add font above the dialog box): Qgroupbox {border
-color:rgb (156,156,156); Border-width:1px; Border-Style:solid; Margin-top:0. 5ex; } qgroupbox::title {Subcontrol-Origin:margin; Subcontrol-Position:top left; left:10px; Margin-left:2px; padding:00px; } 4. Click the OK button;5. Confirm the effect.
Qt qgroupbox StyleSheet Border settings