Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void barcode::paintEvent(QPaintEvent *event)
- {
- if (!plain_text_.isEmpty())
- {
- QPainter painter(this);
- painter.setRenderHint(QPainter::Antialiasing);
- barcode_impl_.setText(plain_text_);
- barcode_impl_.setHideText(true);
- barcode_impl_.setWidth(width());
- barcode_impl_.setHeight(height());
- barcode_impl_.setSymbol(BARCODE_CODE128);
- barcode_impl_.setScale(1.0);
- barcode_impl_.render(painter, rect(), Zint::QZint::AspectRatioMode::KeepAspectRatio);
- qDebug() << barcode_impl_.error_message();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment