|  | 
|  | DToolTip (const QString &text, bool completionClose=true) | 
|  | DToolTip的构造函数 
 | 
|  | 
| QSize | sizeHint () const override | 
|  | 获取 ToolTip 控件的推荐大小 
 | 
|  | 
| void | show (const QPoint &pos, int duration) | 
|  | 设置提示消息出现的位置 
 | 
|  | 
|  | DTipLabel (const QString &text=QString(), QWidget *parent=nullptr) | 
|  | DTipLabel的构造函数 text 文本信息 parent 参数被发送到 QLabel 构造函数。 
 | 
|  | 
| void | show (const QPoint &pos) | 
|  | DTipLabel::show显示在指定的位置上 pos 显示位置 
 | 
|  | 
| void | setForegroundRole (DPalette::ColorType color) | 
|  | DTipLabel::setForegroundRole显示的字体颜色 color 字体颜色 
 | 
|  | 
|  | DLabel (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags()) | 
|  | DLabel的构造函数. 
 | 
|  | 
|  | DLabel (const QString &text, QWidget *parent=nullptr) | 
|  | DLabel的构造函数. 
 | 
|  | 
|  | ~DLabel () | 
|  | DLabel的析构函数 
 | 
|  | 
| void | setForegroundRole (QPalette::ColorRole role) | 
|  | 显示的字体颜色 
 | 
|  | 
| void | setForegroundRole (DPalette::ColorType color) | 
|  | 显示的字体颜色 
 | 
|  | 
| void | setElideMode (Qt::TextElideMode elideMode) | 
|  | 设置省略号显示的模式 
 | 
|  | 
| Qt::TextElideMode | elideMode () const | 
|  | 获取省略号的模式 
 | 
|  | 
类似于 QToolTip 功能的类 
用于在指定位置显示工具提示信息
示例代码
main.cpp
#include <QVBoxLayout>
#include <DApplication>
#include <DMainWindow>
#include <DToolTip>
 
DWIDGET_USE_NAMESPACE
 
int main(int argc, char *argv[])
{
    window.setMinimumSize(QSize(300, 200));
 
    QWidget *centralWidget = new QWidget(&window);
    QVBoxLayout *layout = new QVBoxLayout(centralWidget);
 
    QString 
Content = 
"<em><strong><u>这是一条提示消息"; 
    QPoint pos(200,200);
    layout->addWidget(tool);
 
    window.setCentralWidget(centralWidget);
    window.show();
 
    return app.exec();
}
The DMainWindow class provides a main application window.
Definition dmainwindow.h:20
