Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Seperating GUI from Logic?

Seperating GUI from Logic?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.2k Views
  • 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 Offline
    M Offline
    maybnxtseasn
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • U Offline
      U Offline
      uranusjr
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • R Offline
        R Offline
        richelbilderbeek
        wrote on last edited by
        #3

        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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved