예제 #1
0
void CLabel::enterEvent(QEvent *e)
{
    if (!getMousePressFlag())
    {
        setMouseEnterFlag(true);
    }
    this->setCursor(Qt::PointingHandCursor);
}
예제 #2
0
void CLabel::paintEvent(QPaintEvent *e)
{
    QPainter painter(this);

    if (getMouseEnterFlag())
    {
        paintWidget(50, &painter);
    }
    else if (getMousePressFlag())
    {
        paintWidget(80, &painter);
    }

    QWidget::paintEvent(e);
}
예제 #3
0
void CLabel::paintEvent(QPaintEvent *e)
{
	QPainter painter(this);

	if (getMouseEnterFlag())
	{ 
		if (m_bEnableTransition)
		{
			paintWidget(100, &painter, 0);
		}
		else
		{
			paintWidget(100, &painter, 3);
		} 
	}
	else if (getMousePressFlag())
	{
		if (m_bEnableTransition)
		{
			paintWidget(150, &painter,0);
		}
		else
		{
			paintWidget(180, &painter,3);
		}
		
		//paintWidget(200, &painter);
	}
	else
	{
		if (!m_bIsBkgTransparent)
		{
			paintWidget(50, &painter,0);
		}
		//paintWidget(20, &painter);
	}
	QWidget::paintEvent(e);
}