Skip to content

Commit

Permalink
小修复并修改外观
Browse files Browse the repository at this point in the history
  • Loading branch information
andywowws committed Jul 13, 2023
1 parent 935c9ba commit 09bdd4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion calculator/calcer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ calcer::calcer(QWidget *parent)
, ui(new Ui::calcer)
{
setWindowFlags(windowFlags()& ~Qt::WindowMaximizeButtonHint);
setFixedSize(this->width(),this->height());
setFixedSize(339,582);
ui->setupUi(this);
ui->textEdit->setReadOnly(true);
ui->textEdit2->setReadOnly(true);
Expand Down Expand Up @@ -44,6 +44,7 @@ void calcer::keyPressEvent(QKeyEvent *event){
}
void calcer::pushb(){
QString s=ui->textEdit->toPlainText();
if(s=="0")return;
QChar c=*(s.end()-1);
s.erase(s.end()-1);
if(c=='(')ss=0;
Expand Down
1 change: 1 addition & 0 deletions calculator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setStyle("fusion");
calcer w;
w.show();
return a.exec();
Expand Down

0 comments on commit 09bdd4f

Please sign in to comment.