The code below creates a single QLineEdit()
with QSS stylesheet applied.
I would appreciate if you show how to change the font size and font color of the QLineEdit
using QSS. I have tried font-size: 12;
. But it doesn't work.
from PyQt4.QtCore import *
from PyQt4.QtGui import *
app=QApplication([])
bgColor='#262626'
style="""QLineEdit{{ color: #EBEBEB; border: 0px solid black; background-color: {0}; color: #EBEBEB }} QLineEdit:hover{{ border: 1px solid #ffa02f;}}""".format(bgColor)
lineEdit=QLineEdit()
lineEdit.setText('My Line Edit')
lineEdit.setStyleSheet(style)
lineEdit.show()
sys.exit(app.exec_())