QCommandLinkButton Class

QCommandLinkButton ウィジェットは、Vista スタイルのコマンドリンクボタンを提供します。詳細...

ヘッダー #include <QCommandLinkButton>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
継承: QPushButton

プロパティ

パブリック関数

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で導入された新しいコントロールである。その使用目的はラジオボタンに似ており、相互に排他的なオプションのセットから選択するために使用されます。コマンドリンクボタンを単独で使用するのではなく、ウィザードやダイアログでラジオボタンの代わりとして使用し、"次へ "ボタンを押すのを冗長にします。外観は一般的に平らな押しボタンに似ていますが、通常のボタンテキストに加えて説明テキストを記述することができます。デフォルトでは矢印のアイコンも表示され、このコントロールを押すと別のウィンドウやページが開くことを示します。

QPushButtonQRadioButtonも参照して ください。

プロパティ・ドキュメント

description : QString

このプロパティは、ボタンのテキストを補完するための説明的なラベルを保持します。

このプロパティを設定すると、テキストラベルを補完する説明的なテキストがボタンに設定されます。これは通常、主テキストよりも小さなフォントで表示されます。

アクセス関数:

QString description() const
void setDescription(const QString &description)

flat : bool

このプロパティは、ボタンがフラットパネルとして表示されるか、ボーダー付きで表示されるかを決定する。

デフォルトでは、このプロパティはfalseに設定されています。

アクセス関数:

bool isFlat() const
void setFlat(bool)

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)

textdescriptionparent でコマンドリンクを構築する。

[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.

© 2025 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.