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. Creating an API with Qt Creator?
QtWS25 Last Chance

Creating an API with Qt Creator?

Scheduled Pinned Locked Moved Solved General and Desktop
apilibraryqt 5.4
6 Posts 3 Posters 2.4k 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.
  • V Offline
    V Offline
    VitAmine
    wrote on 24 May 2016, 10:29 last edited by
    #1

    Hi, guys
    I wonder if you could help me?
    I want to create my own API on QT and I don't really know how to configure the project and implement my different classes and functions, if you have any idea let me know.

    thank you.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 24 May 2016, 10:33 last edited by
      #2

      Hi and welcome
      What kind of API ?
      What is the goal for the project?
      How will other people use your API ?

      V 1 Reply Last reply 24 May 2016, 11:05
      0
      • M mrjj
        24 May 2016, 10:33

        Hi and welcome
        What kind of API ?
        What is the goal for the project?
        How will other people use your API ?

        V Offline
        V Offline
        VitAmine
        wrote on 24 May 2016, 11:05 last edited by
        #3

        hi, @mrjj I have a project with different classes and headers that allow me to interact with a hardware card and i wanted to simplify the use of the project for my teammates in aim to be able to use all the functions classes with out caring about the code i implemented (in my classes).
        I don't know if it's more clear now !!

        M K 2 Replies Last reply 24 May 2016, 11:12
        1
        • V VitAmine
          24 May 2016, 11:05

          hi, @mrjj I have a project with different classes and headers that allow me to interact with a hardware card and i wanted to simplify the use of the project for my teammates in aim to be able to use all the functions classes with out caring about the code i implemented (in my classes).
          I don't know if it's more clear now !!

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 24 May 2016, 11:12 last edited by
          #4

          @VitAmine
          Yes its clear.
          Normally such work would to be to provide a more convenient class(es) that hides
          some of the details
          so setting up the hardware becomes easier.
          Or the data reading. It might use internal thread to poll, but API user will just
          hook to a signal and get called when data is ready.
          etc.

          But it all depends what the hardware does and how u need the API user to handle it.

          1 Reply Last reply
          0
          • V VitAmine
            24 May 2016, 11:05

            hi, @mrjj I have a project with different classes and headers that allow me to interact with a hardware card and i wanted to simplify the use of the project for my teammates in aim to be able to use all the functions classes with out caring about the code i implemented (in my classes).
            I don't know if it's more clear now !!

            K Offline
            K Offline
            kshegunov
            Moderators
            wrote on 24 May 2016, 11:33 last edited by
            #5

            @VitAmine
            Hello,
            When providing API you usually do that from a library, and the best in my opinion is to expose it from a dynamic library (.so/.dll/.dynlib). What I do is think about what others need to use - that is, which classes will they need/want to use and how. Then I write those classes down, and after I have the interface (i.e. the API) I go and implement the internals.

            I do it this way, because it's important to have a good, intuitive and convenient to use API, while the implementation is well, a detail that doesn't and shouldn't affect the user programmer.

            Kind regards.

            Read and abide by the Qt Code of Conduct

            1 Reply Last reply
            2
            • V Offline
              V Offline
              VitAmine
              wrote on 24 May 2016, 12:07 last edited by
              #6

              cool, thank you guys for your answers.

              1 Reply Last reply
              0

              1/6

              24 May 2016, 10:29

              • Login

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