m4n71k0r

Untitled

Jun 4th, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void barcode::paintEvent(QPaintEvent *event)
  2. {
  3.     if (!plain_text_.isEmpty())
  4.     {
  5.         QPainter painter(this);
  6.         painter.setRenderHint(QPainter::Antialiasing);
  7.         barcode_impl_.setText(plain_text_);
  8.         barcode_impl_.setHideText(true);
  9.         barcode_impl_.setWidth(width());
  10.         barcode_impl_.setHeight(height());
  11.         barcode_impl_.setSymbol(BARCODE_CODE128);
  12.         barcode_impl_.setScale(1.0);
  13.         barcode_impl_.render(painter, rect(), Zint::QZint::AspectRatioMode::KeepAspectRatio);
  14.         qDebug() << barcode_impl_.error_message();
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment