![]() |
Cannot Import stylesheet BG? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: Cannot Import stylesheet BG? (/thread-12063.html) |
Cannot Import stylesheet BG? - mekha - Aug-07-2018 I merged my old code with new interface look, it has 4 tabs menu, and the 2nd tab is my old graph sound visualizer (https://python-forum.io/Thread-PyQt-Assign-Label-Text-as-number-in-Hz). so I using stylesheet CSS for the bg image (using qrc) in the Qgraphicsview, I have everything including the .qrc file (named as img.qrc), image file (named as tCbmr4w - Copy.jpg) and the python files itself inside 1 folder... and I run the code, but it said but if I put off the import img_rc inside the ui_main (this py file only for the design no additional code I add after being converted from .ui to .py) the code running well but no image in it, and the tab goes immediately to the 2nd tab... Where did I do it wrong??? ![]() RE: Cannot Import stylesheet BG? - mekha - Aug-08-2018 I found out that everytime I used CSS Stylesheet, I always cannot run the code and the error is the same... it's the import img_rc thing that can't be declared or something so it doesn't matter what I used; tabs, frame, button, etc if I still used CSS Stylesheet I can't run the code no matter what so any IDEA how to put a background on my tabs? I'm using PyQt4 |