Results 1 to 2 of 2

Thread: calculator that show its operation

  1. #1
    Join Date
    Apr 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default calculator that show its operation

    hi !
    im making a calculator uising qtcreator . and its suppose to show its operation in the first lineEdit .

    for example , when i click on num 2, then on '+' button, and lastly the num 3, the first lineEdit should be '2+3'. when i click on '=' button , the answer should
    appear in second lineEdit ..

    can anyone help me with the coding ? for example -> dd.png

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanked 342 Times in 324 Posts

    Default Re: calculator that show its operation

    You need to parse the infix expression, simple way is to convert it to reverse-polish notation (Shunting-yard algorithm) and then use stack to calculate the result.

Similar Threads

  1. Operation of 'show'
    By sterling in forum Newbie
    Replies: 4
    Last Post: 9th January 2014, 05:12
  2. Replies: 6
    Last Post: 12th September 2011, 13:23
  3. Replies: 10
    Last Post: 16th March 2010, 09:50
  4. How show progress of slow a operation?
    By shud in forum Qt Programming
    Replies: 9
    Last Post: 3rd December 2009, 23:10
  5. Show progress of a time consuming operation
    By rainman110 in forum Newbie
    Replies: 7
    Last Post: 10th February 2008, 13:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.