QCommandLinkButton Class
QCommandLinkButton ウィジェットは、Vista スタイルのコマンドリンクボタンを提供します。詳細...
| ヘッダー: | #include <QCommandLinkButton> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
| 継承元: | QPushButton |
プロパティ
- description : QString
- flat : bool
パブリック関数
| QCommandLinkButton(QWidget *parent = nullptr) | |
| QCommandLinkButton(const QString &text, QWidget *parent = nullptr) | |
| QCommandLinkButton(const QString &text, const QString &description, QWidget *parent = nullptr) | |
| virtual | ~QCommandLinkButton() |
| QString | description() const |
| void | setDescription(const QString &description) |
再実装されたパブリック関数
| virtual int | heightForWidth(int width) const override |
| virtual QSize | minimumSizeHint() const override |
| virtual QSize | sizeHint() const override |
再実装された保護関数
| virtual bool | event(QEvent *e) override |
| virtual void | paintEvent(QPaintEvent *) override |
詳細な説明
コマンドリンクは、Windows Vistaで導入された新しいコントロールです。その用途は、互いに排他的な一連のオプションから選択するために使用されるという点で、ラジオボタンと似ています。コマンドリンクボタンは単独で使用すべきではなく、ウィザードやダイアログにおけるラジオボタンの代替として使用され、「次へ」ボタンを押す操作を不要にします。 外観は一般的にフラットなプッシュボタンに似ていますが、通常のボタンテキストに加えて説明的なテキストを表示することができます。また、デフォルトでは矢印アイコンが表示され、このコントロールを押すと別のウィンドウやページが開くことを示します。
QPushButton およびQRadioButtonも参照してください 。
プロパティのドキュメント
description : QString
このプロパティには、ボタンのテキストを補足する説明ラベルが設定されます
このプロパティを設定すると、ボタンに説明テキストが表示され、テキストラベルを補足します。通常、このテキストはメインのテキストよりも小さいフォントで表示されます。
アクセス関数:
| QString | description() const |
| void | setDescription(const QString &description) |
flat : bool
このプロパティは、ボタンがフラットなパネルとして表示されるか、それとも枠付きで表示されるかを決定します。
デフォルトでは、このプロパティは false に設定されています。
アクセス関数:
関連項目: QPushButton::flat 。
メンバ関数のドキュメント
[explicit] QCommandLinkButton::QCommandLinkButton(QWidget *parent = nullptr)
テキストを含まず、parent を持つコマンドリンクを作成します。
[explicit] QCommandLinkButton::QCommandLinkButton(const QString &text, QWidget *parent = nullptr)
親要素としてparent 、テキストとしてtext を持つコマンドリンクを作成します。
[explicit] QCommandLinkButton::QCommandLinkButton(const QString &text, const QString &description, QWidget *parent = nullptr)
text 、description 、およびparent を使用して、コマンドリンクを構築します。
[virtual noexcept] QCommandLinkButton::~QCommandLinkButton()
デストラクタ。
[override virtual protected] bool QCommandLinkButton::event(QEvent *e)
QPushButton::event(QEvent *e) を再実装します。
[override virtual] int QCommandLinkButton::heightForWidth(int width) const
QWidget::heightForWidth (int w)const を再実装します。
[override virtual] QSize QCommandLinkButton::minimumSizeHint() const
QPushButton::minimumSizeHint() const を再実装します。
[override virtual protected] void QCommandLinkButton::paintEvent(QPaintEvent *)
QPushButton::paintEvent (QPaintEvent *)を再実装します。
[override virtual] QSize QCommandLinkButton::sizeHint() const
QPushButton::sizeHint() const を再実装します。
© 2026 The Qt Company Ltd. 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.