PDA

View Full Version : Problem with tree widget



keyurparekh
5th April 2011, 12:43
Hi friends

I have currently take tree widget in QT designer form. Now i have add two item into it.
I have write below sentence into style sheet. it changes back ground image.


border-image:url(:/BG-Main.png);

Now when i add items into it, it changes item color to white. and rest of the widget has back ground image. But item part lost image part and shows white back ground.

I am not able to get what could be the problem Please let me know in this matter.

jackal
6th April 2011, 13:43
if you don't set your items' bg color (or image), they must be transparent. With only that row in style sheet (border-image:url(:/BG-Main.png);) even the tooltips take the same background. Just check out your code to be sure you're not setting any background in your items

keyurparekh
7th April 2011, 07:42
thanks for your reply...
but can you tell me how to make tree widget item transparent... I don't know to do it...
please give me some source code to make it transparent....

keyurparekh
8th April 2011, 09:16
helloooo is any body there to reply me for my problem.......
i have already mention problem regarding tree widget.... I am really stuck with problem....
I have create one tree widget... in designer form. I have add three item into it.... Now i change pallate color of tree widget...
Now when i change back ground transparent of tree widget it works fine. but item shows in white colour only... I have change item colour also but that also not works...
the other thing is when i click on item it shows highlight colour as marun colour. I don't want that selection colour also... How can i remove it...
Please let me know solution plzzzzzz
waiting for your reply guysssssssssss.

thanks in advance...........

jackal
8th April 2011, 23:14
When I read your first post I tried it in one of my projects. I did everything exactly as you did and here's how it worked: the tree widget had the background I gave it in design view, all the items I added by code were transparent until I start to edit them. But When I finish editing, they turn transparent again. I also have tool-tips there with no text, and they have the same bg as well.
Check out this example (http://doc.trolltech.com/4.2/widgets-stylesheet.html). I'm sure you can find all you want there.