Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Seperating GUI from Logic?

    General and Desktop
    3
    3
    2048
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      maybnxtseasn last edited by

      Anyone have any advise or good reads on separating the GUI from programming logic using?

      1 Reply Last reply Reply Quote 0
      • U
        uranusjr last edited by

        There is a nice "introduction":http://doc.qt.digia.com/qt/model-view-programming.html in official documentation

        1 Reply Last reply Reply Quote 0
        • R
          richelbilderbeek last edited by

          For some applications, I develop a desktop (using Qt), web (using Wt) and console version (for example http://richelbilderbeek.nl/ToolSimMysteryMachine.htm has both a desktop and webversion). My personal trick is, how plain simple it may sound, is to let the GUI do only the GUI stuff (like reading edit boxes) and feed this to a GUI-less member dialog.

          For example, a QtSomeDialog and WtSomeDialog both contain the same SomeDialog. The Qt dialog reads an edit box (as a QString) and passes it to SomeDialog as a std::string. The Wt dialog reads an edit box (as a Wt::WString) and passes it to SomeDialog as a std::string.

          Personally, I enjoy doing this as my architecture has -IMHO- improved.

          I wrote one tiny article about the subject: http://richelbilderbeek.nl/CppFromDesktopToWebApplication.htm

          Cheers, Bilderbikkel

          1 Reply Last reply Reply Quote 0
          • First post
            Last post