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. Design tips on writing on translator like application using Qt?

Design tips on writing on translator like application using Qt?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 177 Views 2 Watching
  • 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.
  • V Offline
    V Offline
    vijaychsk
    wrote on last edited by
    #1

    Hi,
    I'm trying to write an application that looks almost similar to Google Translator.
    I'm a bit new to Qt and not sure how to approach the solution -- whether to use Model/View or not.

    My application is simple,

    1. In a new Qt window, gives/load a directory. Reading this database means calling another API.
    2. User has two options to translate on the window: from A to B or B to A.
      There will be a pushbutton and some text boxes to enter. To display the result, I want to use a single row table.
    3. Note: I won't be having a pre-compiled database after loading a directory.
    4. Searching the directory happens on the fly -- like taking the input (A or B) can calling other API (which I don't own). I just display what the API returns.
    5. This is not performance optimal. So, I'm planning to implement a hashMap within Qt code, to store all the searches. A repeated search will be faster. Once the window is closed, I'll clear map.

    Any design ideas?
    I'm especially confused if I should use Model/View design pattern here?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      I don't see any use of model in what you suggest here.
      You basically call an API on press of a button, so I do not see the need of model view. You might want to consider doing some caching to avoid spamming the API with request already done though.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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