You can use 2 line edits in horizontal layout.

Than set spacing 0 to the horizontal layout.
Then set style sheet as below.

Qt Code:
  1. QString stylesheet1 = QString("QLineEdit { background-color: white ; border: none ; }"); //alternatively you can set border-right : none for line edit 1 instead of border: none
  2. QString stylesheet2 = QString(" QLineEdit {background-color: white ; border: none ; }"); //alternatively you can set border-left : none for line edit 2
  3.  
  4. l_edit2->setText("Image_");
  5. l_edit2->setText("<COUNTER>");
  6. l_edit2->setReadOnly(true);
  7.  
  8. l_edit1->setStyleSheet(stylesheet1);
  9. l_edit2->setStyleSheet(stylesheet2);
To copy to clipboard, switch view to plain text mode