how to change the background color of QLineEdit
-
but I am seeing boundary which I do not want I want QLineEdit should be part background widger
@Qt-Enthusiast
As I see the context of what you want to do I would advise to use a QLabel instead of the QLineEdit. You never want to use it as an input field are you?If you use QLabel you already have the background color without the border
-
But I am not able to use copy and paste with
https://forum.qt.io/topic/80070/how-to-change-the-mouse-cursor-that-shows-qlable-is-selectable/11
-
but I am seeing boundary which I do not want I want QLineEdit should be part background widger
@Qt-Enthusiast Did you check the link @J-Hilk provided? It show how to change border of QLineEdit.
-
I will try
-
@Qt-Enthusiast
As I see the context of what you want to do I would advise to use a QLabel instead of the QLineEdit. You never want to use it as an input field are you?If you use QLabel you already have the background color without the border
@Eddy said in how to change the background color of QLineEdit:
As I see the context of what you want to do I would advise to use a QLabel instead of the QLineEdit. You never want to use it as an input field are you?
@Qt-Enthusiast Could you please answer the question?
-
@Qt-Enthusiast
As I see the context of what you want to do I would advise to use a QLabel instead of the QLineEdit. You never want to use it as an input field are you?If you use QLabel you already have the background color without the border
@Eddy But I am not able to use copy and paste with
https://forum.qt.io/topic/80070/how-to-change-the-mouse-cursor-that-shows-qlable-is-selectable/11
reply
-
@Eddy But I am not able to use copy and paste with
https://forum.qt.io/topic/80070/how-to-change-the-mouse-cursor-that-shows-qlable-is-selectable/11
reply
OK, you don't want QLabel because you need copy paste funcitonality. Now I understand.
You can use the following stylesheet on your lineedit :
ui->lineEdit->setStyleSheet("background: transparent; border: 0px ;");
-
ui->lineEdit->setStyleSheet("background: transparent; border: 0px ;"); is giving me white color for background , how to set Color with RGB QColor(236,236,236) in below line
ui->lineEdit->setStyleSheet("background: transparent; border: 0px ;");
-
OK, you don't want QLabel because you need copy paste funcitonality. Now I understand.
You can use the following stylesheet on your lineedit :
ui->lineEdit->setStyleSheet("background: transparent; border: 0px ;");
This post is deleted! -
@Qt-Enthusiast
Glad you could make it work. Can you please mark this topic as solved and start a new one since this is a totally different question.
Please provide us with the needed code of what you have already and explain as good as possible what you want to do.Edit : made a new topic for your question : copy from qlineedit using pop up menu