Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "widget.h"
- #include "ui_widget.h"
- Widget::Widget(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::Widget)
- {
- ui->setupUi(this);
- }
- Widget::~Widget()
- {
- delete ui;
- }
- void Widget::updateBaseNotation(QString input)
- {
- if(buffer != input)
- {
- buffer = input;
- ui->leInput->setText(buffer);
- emit inputChanged(buffer);
- }
- bool correct;
- int data = input.toInt(&correct);
- if(correct)
- {
- ui->leB2->setText(QString("%1").arg(data,0,2));
- ui->leB3->setText(QString("%1").arg(data,0,3));
- ui->leCustom->setText(QString("%1").arg(data,0,ui->sBase->value()));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement