You can use 2 line edits in horizontal layout.
Than set spacing 0 to the horizontal layout.
Then set style sheet as below.
QString stylesheet1
= QString("QLineEdit { background-color: white ; border: none ; }");
//alternatively you can set border-right : none for line edit 1 instead of border: none QString stylesheet2
= QString(" QLineEdit {background-color: white ; border: none ; }");
//alternatively you can set border-left : none for line edit 2
l_edit2->setText("Image_");
l_edit2->setText("<COUNTER>");
l_edit2->setReadOnly(true);
l_edit1->setStyleSheet(stylesheet1);
l_edit2->setStyleSheet(stylesheet2);
QString stylesheet1 = QString("QLineEdit { background-color: white ; border: none ; }"); //alternatively you can set border-right : none for line edit 1 instead of border: none
QString stylesheet2 = QString(" QLineEdit {background-color: white ; border: none ; }"); //alternatively you can set border-left : none for line edit 2
l_edit2->setText("Image_");
l_edit2->setText("<COUNTER>");
l_edit2->setReadOnly(true);
l_edit1->setStyleSheet(stylesheet1);
l_edit2->setStyleSheet(stylesheet2);
To copy to clipboard, switch view to plain text mode
Bookmarks