QTextEdit and setStyle
-
There is a mistake in the syntax:
@edit->setStyleSheet("background-image: url(bg.png)");@It should be:
@edit->setStyleSheet("background-image: url(:/bg.png)");@
and "bg.png "must be" added to resource file and should in source directory -
Hi
I still cannot get this working!
This is my .pro file
@TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .Input
SOURCES += main.cpp
RESOURCES +=
res.qrc
@
I used QCreator to add this image to the resource file
but still no joyfrustrated
-
I suppose there is only one way I can help you now. Make a zip file of your project and upload the download link so that i can download the project and look for the problem.
-
Hi Adnam
Thanks for your help!
Forgive my ignorance (im new here) but how do I send you my project? -
I recieved your project , i will look into it
-
Message sent
Thanks
-
You had committed a silly mistake in adding the image to resource file. The prefix should had been "/" but it was "/images" in your case (it is also correct but) your folder containing the image was also named as "image", so the address of image should have been "/images/images/bn.jpg". It is working fine now. I have changed the prefix to "/" from "/images". So now the valid address is "/images/bn.jpg"
-
Hi
Thanks, but it still does not work for me
There must be something different in our systems, but I dont know what!
do you have any ideas? -
As you said it is not working under windows but working under linux perhaps It’s the windows style that prevents it then.
-
I take it that you are using Linux then?
-
Yes i use ubuntu
-
I also have similar problems like GTK+ style of linux does not allow for changing background color of progress bar