本页内容

Layouting::Label Class

class Layouting::Label

封装了QLabel ,以便在布局构建器中使用。更多内容...

Header: #include <Label>
Inherits: Layouting::Widget

公共函数

void onLinkActivated(QObject *guard, const std::function<void (const QString &)> &func)
void onLinkHovered(QObject *guard, const std::function<void (const QString &)> &func)

详细说明

另请参阅 Layouting::Widget 。

成员函数文档

void Label::onLinkActivated(QObject *guard, const std::function<void (const QString &)> &func)

将func 连接到QLabel::linkActivated 信号。当guard 被销毁时,该连接将自动解除。

void Label::onLinkHovered(QObject *guard, const std::function<void (const QString &)> &func)

将func 连接到QLabel::linkHovered 信号。

当guard 被销毁时,该连接会自动解除,从而避免悬空连接。请传入一个对象,其生命周期将决定连接应保持活跃的时间,通常是外围类的this 。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.