How to insert image in QLineEdit with Qt android C++
-
Hello everyone, I want to insert image into QLineEdit for login purpose with my Android Application. I found QLineEdit::addAction(const QIcon &icon, QLineEdit::ActionPosition position). Is it the best way to do that ? I remind you that my version is 5.12.
This Image attached below would exlpain what i want exactly.
Please help me. -
Hi,
If you want it to be integrated to the line edit, yes.
Otherwise you can use a QHBoxLayout with 0 spacing/margins so the image is right against the line edit.
-
Hi,
If you want it to be integrated to the line edit, yes.
Otherwise you can use a QHBoxLayout with 0 spacing/margins so the image is right against the line edit.
@SGaist That's not what I want exactly.
I want the image where ID CHASSIS and PASSWORD become writable. I mean when i run the application i can write on it.
the background of the QLineEdit is white and sot suitable for my background. So I need a solution for it. -
@SGaist That's not what I want exactly.
I want the image where ID CHASSIS and PASSWORD become writable. I mean when i run the application i can write on it.
the background of the QLineEdit is white and sot suitable for my background. So I need a solution for it.@Sakhana99
Either change the background to a different color, or if you want an image what about doing it via stylesheetbackground: url(...)
, like https://stackoverflow.com/a/14038720 ?