Results 1 to 2 of 2

Thread: Switching Calculator Exhibition Mode (Classic to Advanced)

  1. #1
    Join Date
    Sep 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Switching Calculator Exhibition Mode (Classic to Advanced)

    Hello everybody,

    I'm pretty new to Qt programming and I'm trying to create a more robust calculator based on the one from Qt's Tutorial. Right now, I'm trying to figure out how to implement different exhibition modes in the same application (e.g open the default basic calculator with just arithmetic operations but having an option in the menu to switch to advanced, which shows some other operations like cos,sin,sqrt,etc) . I guess I could do that with dynamic Widgets creation, but is there any other simpler way for doing that ?

    Thanks in advance,

    Luiz.


    Added after 8 minutes:


    Well, just after posting this I found the solution : that would be using QStackedWidgets (http://doc.qt.nokia.com/latest/qstac...t.html#details) which create different "pages" of widgets in a single application, in a way similar to "Tabs". In that way you can organize the "titles" for each of those pages in a class like QListWidget. I'll try to implement that on my project.

    Luiz.
    Last edited by lgb3; 29th September 2011 at 19:16.

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Switching Calculator Exhibition Mode (Classic to Advanced)

    Other option (i think better) is to create a dialog that can change it's "shape" into an advanced dialog, see this example.

Similar Threads

  1. Replies: 11
    Last Post: 19th August 2010, 13:14
  2. Replies: 4
    Last Post: 27th May 2010, 15:18
  3. Replies: 1
    Last Post: 2nd November 2009, 12:02
  4. Replies: 9
    Last Post: 15th April 2009, 06:23
  5. Replies: 8
    Last Post: 10th October 2007, 18:20

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.