PDA

View Full Version : Styling a QTabWidget



chuckshaw
18th February 2008, 19:25
Hey Guys,

I'm working with a touch screen so the buttons have to be large. I am using a QTabWidget and am having trouble getting the tabs set to a height of 75px. I also have a few buttons set as the QTabWidget's corner widget in the upper right hand side of the screen. They are also set to 100px width and 75 px height. Now they all seem to be set to the right side on there own. However they are being cut off by the starting of the QTabWidgets pane. So i can see the text of the tabs label, but its cut off right through the middle.

Here is an excerpt from my stylesheet:


#DCTabs QTabWidget::pane { /* The tab widget frame */
/*border-top: 2px solid #ffff33;*/
background-color: #000000;
}

#DCTabs QTabWidget::tab-bar {
left: 7px;
background-color: #000000;
}

#DCTabs QTabBar::tab {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #191919, stop: 1 #262626);
border: 2px solid #C4C4C3;
border-bottom-color: #C2C7CB;
border-top-left-radius: 5px;
border-top-right-radius: 20px;
min-width: 5em;
min-height: 75px;
padding: 4px;
margin-left: 0px;
margin-top: 5px;
color: #00FF00;
}



Any idea how i can solve this problem with stylesheets, or is this something i will have to manually do in code?

Thanks,
Chuck

chuckshaw
18th February 2008, 21:17
I ended up solving my problem.