I am trying to create/ replicate a QLineEdit widget with the ones that we see in Maya (where it has a color label on the left hand side that denotes if it is keyed or not)
I am able to replicate it to a certain extent, however having some issues at the same time:
- See attached, between my icon and the left outer-most of the QLineEdit, there is a small gap
- The icon size is not rectangular-ish as I would have expected despite the actual image is scaled in 10x16 pixels.
Here is a quick code sample of my QLineEdit:
my_icon = QtGui.QPixmap('full_keyed.png')
self.ui.positionXLineEdit.addAction(my_icon, QtWidgets.QLineEdit.LeadingPosition)
And so, is there a better for me to attain what I had wanted to achieve as seen in Maya?