You should be able to query the style() for a default palette.
You should be able to query the style() for a default palette.
mclark (1st February 2008)
Hi, sorry to bring this article up, but I really need some help.
Here's my code:
Qt Code:
ui->tableWidget->setPalette(palette); ui->tableWidget->show();To copy to clipboard, switch view to plain text mode
What did I do wrong, that only the background behind cells gets colored?
Cells are still white.
I'm using designer.
Here's image of the problem.
problem.jpg
Is there an easy way to make cells transparent or somehow use the image as background?
Any help would be appreciated.
You're problem is different than the one I started this thread about. I had an empty table - no rows, no columns and wanted an image to display. You need transparent cells so the background image can show through.
While I don't know how to do this, I would start by giving the cells no brush.
If that didn't work I would look at setting the opacity of the brush (see QBrush documentation) or maybe this could be handled with a stylesheet.Qt Code:
To copy to clipboard, switch view to plain text mode
If you get nowhere with these suggestions, start a new thread. There are some very bright developers on this forum and someone must know the answer to this problem.
I know this is an old thread but i have the same problem
i have written this:
Qt Code:
playlistTable.setPalette(palette);To copy to clipboard, switch view to plain text mode
and it doesn't work
PS: using QtJambi
Bookmarks