T4ng10r
25th April 2007, 07:32
I want to create table made of QLabels. It's gonna be two rows of at last 6 labels.
Problem is in showing labels borders. I was trying something like that
setText("<table width=\"100%\" height=\"100%\" border=1><tr><td>Test</td></tr></table>");
but it won't work fine with vertical layout (beside it's not nice).
So - time for stylesheets.
setStyleSheet("border-color: red ; border-width: 2px");
setStyleSheet("border: 5px solid black;");
still nothing. Stylesheets for QLabel works - cause I used them to change label background. But when I extend them with above code - there's no border.
Problem is in showing labels borders. I was trying something like that
setText("<table width=\"100%\" height=\"100%\" border=1><tr><td>Test</td></tr></table>");
but it won't work fine with vertical layout (beside it's not nice).
So - time for stylesheets.
setStyleSheet("border-color: red ; border-width: 2px");
setStyleSheet("border: 5px solid black;");
still nothing. Stylesheets for QLabel works - cause I used them to change label background. But when I extend them with above code - there's no border.