Hi Guys,

I am trying to skin a QLineEdit so that it feels like a transparent.
The whole reason I am trying to do this, I would like to let users
copy text from the QLineEdit and I would prefer it not to look like an
input entry.

Here is what I have so far. Basic background works but I couldn't get
rid of boundary/border. With stylesheet, I could get rid of border but
not the background. Looks like QLineEdit is not accepting background-
image.

#-- background is transparent but not the border ---
       self.lineEdit3 = QtGui.QLineEdit("Output: ")
       self.lineEdit3.setFocusPolicy(QtCore.Qt.NoFocus)

       newPalette = QtGui.QPalette()
       newPalette.setColor(self.lineEdit3.backgroundRole(),
QtCore.Qt.transparent)

#-- border is transparent but not the background --
      self.lineEdit3 = QtGui.QLineEdit("Output: ")
       self.lineEdit3.setFocusPolicy(QtCore.Qt.NoFocus)
       self.lineEdit3.setStyleSheet("QLineEdit { border:none;
background-image: url(transparent_bg.png); background-repeat:
repeat;}")
       self.lineEdit3.setStyleSheet("QLineEdit { border:none;}")

Would be great if you guys find any alternatives to achive what I am
trying to do.

thanks in advance
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to