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
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    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, 04:12
  2. Replies: 6
    Last Post: 12th September 2011, 12:23
  3. Replies: 10
    Last Post: 16th March 2010, 08:50
  4. How show progress of slow a operation?
    By shud in forum Qt Programming
    Replies: 9
    Last Post: 3rd December 2009, 22:10
  5. Show progress of a time consuming operation
    By rainman110 in forum Newbie
    Replies: 7
    Last Post: 10th February 2008, 12: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.