PDA

View Full Version : QTableWidget showing white line



deepal_de
23rd May 2011, 10:26
hello

I have attached a image of my tablewidget. i have highlighted area in red..
i wont to remove it...

6466

its a tablewidget inside a panel and its inside Gridlayout with no spacing in layout.

i have 2 stylesheets
Panle style sheet :-


background-color: qlineargradient(spread:pad, x1:0.489, y1:0, x2:0.489, y2:0.086, stop:0 rgba(209, 224, 255, 255), stop:0.977273 rgba(255, 255, 255, 255));



Tablewidgeet stylesheet :-

/* QHeaderView::section {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:0.892, stop:0 rgba(212, 236, 255, 255), stop:1 rgba(225, 240, 255, 255));

border: 1px solid rgb(188,188,191);
}*/
QHeaderView::section {
background-color: qlineargradient(spread:reflect, x1:0.500318, y1:1, x2:0.512, y2:0.211, stop:0.0795455 rgba(164, 221, 255, 234), stop:1 rgba(234, 254, 255, 227));
border: 1px solid rgb(188,188,191);
}


QTableWidget{
gridline-color: rgb(188, 188, 188);
background-color: rgba(255, 255, 255,0);
/*alternate-background-color: rgba(241, 241, 241,190);*/
}

QTableWidget::item::selected{
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(229, 255, 189, 245), stop:1 rgba(229, 255, 189, 255));
selection-color:black;
}

/*================================================= ====*/
QScrollBar {

background-color: rgb(255, 255, 255);
}

high_flyer
23rd May 2011, 13:04
Set QHeaderView::Stretch to the last section.

deepal_de
24th May 2011, 09:19
Thanks for the reply..

thing is i dont wont to Stretch the tablewidget...
i wont the table occupy space as it require.. but for the extra space panel background should be visible.
I can get that by the configuration on the image..but that white line appears.. how to remove that line??

high_flyer
24th May 2011, 10:04
I would say that you are seeing the table background which is white.
Alos, have a look at this:
http://doc.qt.nokia.com/latest/qwidget.html#autoFillBackground-prop

deepal_de
24th May 2011, 11:08
I even changed the background color of both header and table to transparent,still that white line is there??
any idea why??
can it be something wrong with the style sheet.. i even removed it and tried but still its there..

high_flyer
24th May 2011, 11:26
I even changed the background color of both header and table to transparent,still that white line is there??
I would try to make the header background opaque, and not transparent.
Try setting the window role color to something else, like red, then you can see for sure if what you see is the header background or not.

an it be something wrong with the style sheet.. i even removed it and tried but still its there..
It could be that style sheets to not effect that part of the header - stylesheets don't effect everything.

deepal_de
25th May 2011, 09:06
I tried what you said, but still its there..



QHeaderView::section {
background-color: qlineargradient(spread:reflect, x1:0.500318, y1:1, x2:0.512, y2:0.211, stop:0.0795455 rgba(164, 221, 255, 234), stop:1 rgba(234, 254, 255, 227));
border: 1px solid rgb(188,188,191);
}


QTableWidget{
gridline-color: rgb(188, 188, 188);
background-color: rgba(255, 255, 255,0);
/*alternate-background-color: rgba(241, 241, 241,190);*/
}

QTableWidget::item::selected{
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(229, 255, 189, 245), stop:1 rgba(229, 255, 189, 255));
selection-color:black;
}

/*================================================= ====*/
QScrollBar {

background-color: rgb(255, 255, 255);
}


can it be because of QHeaderView::section in the style sheet...
but as i said before, i tried without style sheet..but still its there..
:(