How I can use external stylesheet for PyQT4 project?
<p>I am just creating a remote app with pyqt4. So, there is lots of css on the UI. I was wondering how to use external stylessheets like in web apps.</p>

<p>For Example: </p>

<pre><code>button_one.setStyleSheet("QPushButton { background-color:#444444; color:#ffffff; border: 2px solid #3d3d3d; width: 15px; height: 25px; border-radius: 15px;}"
                                 "QPushButton:pressed { background-color:#ccc;}")
Instead of the above code 
button_one.setStyleSheet("QPushButton.styleclass or #styleid")
</code></pre>

<p>Cool. Thank you so much for your answer. That helped me to separate my styles finally :) </p>

<p>Just defined all my apps styles on the external file and linked on the required page.
styleFile = "styles/remote.stylesheet"
        with open(styleFile, "r") as fh:
            self.setStyleSheet(fh.read()) </p>

python qt user-interface pyqt4