Qtでフォントのコンボボックスって?
#include <QFontComboBox> #include <QLabel> #include <QVBoxLayout> QFontComboBox *fontBox = new QFontComboBox(this); QLabel *label = new QLabel("サンプルテキスト", this); connect(fontBox, &QFontComboBox::currentFontChanged, this, [=](const QFont &font){ label->setFont(font); }); QVBoxLayout *layout = new QVBoxLayout(this); layout->addWidget(fontBox); layout->addWidget(label); setLayout(layout);