PDA

View Full Version : problem in Layout selection



sosanjay
16th December 2009, 06:58
Hi,

I have using frame in which 2 labels are there but when I select the frame and change the border color of frame through stylesheet the border color of label is also changed.

Please help me that when I select frame then only frame border color changed not with label.


if(o == ui->frmDisp && e->type() == QEvent::MouseButtonRelease)
{
QMouseEvent *me = static_cast<QMouseEvent *>(e);
if(me->button()==Qt::LeftButton)
{
ui->frmDisp->setStyleSheet("border: 2px solid red;\n");

}

dbzhang800
16th December 2009, 07:48
try this:


setStyleSheet("QFrame#yourFrameName{...}")