Qt4:QLabel を使う。


Qt4:百の定石


  • 絵を貼付ける。
    QLabel* picLabel ;
    QPixmap pixmap;
    pixmap.load("tt-logo.jpg") ;
    picLabel->setPixmap( pixmap ) ;
    picLabel->setAlignment(Qt::AlignCenter) ;
  • テキストのサイズや色を変える。
    QLabel* ed = new QLabel  ;
    ed->setFont(QFont( "Times", 18, QFont::Bold )) ;
    ed->setForegroundRole(QPalette::Button) ;
    QPalette p ;
    p.setColor(ed->foregroundRole(), QColor(200, 0, 0)) ;
    ed->setPalette(p) ;
    ed->setText("Good Thing GOing") ;

#include <QFont>
#include <QColor>
#include <QPalette>
#include <QLabel>
#include <QPixmap>

最新の20件

2020-12-25 2007-03-14 2006-10-30 2006-11-09 2007-03-14
  • Qt4:QLabel を使う。
2006-11-09 2006-11-10 2006-11-09 2008-05-20 2007-11-07 2007-11-01

今日の20件

  • counter: 1290
  • today: 1
  • yesterday: 1
  • online: 1