Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to use mongodb as database in qt
Forum Updated to NodeBB v4.3 + New Features

How to use mongodb as database in qt

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 3 Posters 117 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.
  • S Offline
    S Offline
    sumit.chatterjee
    wrote last edited by
    #1

    Hi Qt Community,

    I’m looking for guidance on integrating MongoDB with a Qt application. I’m familiar with Qt for building GUI and backend components, but I haven’t found clear documentation or examples on connecting to a MongoDB database from Qt.

    Specifically, I’d like to know:

    What is the recommended approach for connecting to MongoDB in a Qt application? (Direct C++ driver, Qt plugin, or via REST/HTTP API?)

    Are there any official or community-supported Qt modules for MongoDB?

    Best practices for performing CRUD operations and handling connections asynchronously in Qt.

    If anyone has sample code, tutorials, or pointers to resources, that would be extremely helpful.

    Thanks in advance for your guidance!

    jsulmJ 1 Reply Last reply
    0
    • S sumit.chatterjee

      Hi Qt Community,

      I’m looking for guidance on integrating MongoDB with a Qt application. I’m familiar with Qt for building GUI and backend components, but I haven’t found clear documentation or examples on connecting to a MongoDB database from Qt.

      Specifically, I’d like to know:

      What is the recommended approach for connecting to MongoDB in a Qt application? (Direct C++ driver, Qt plugin, or via REST/HTTP API?)

      Are there any official or community-supported Qt modules for MongoDB?

      Best practices for performing CRUD operations and handling connections asynchronously in Qt.

      If anyone has sample code, tutorials, or pointers to resources, that would be extremely helpful.

      Thanks in advance for your guidance!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote last edited by
      #2

      @sumit.chatterjee As far as I know there is no official Qt driver for MongoDB. But you can use the C++ official C++ driver. REST/HTTP is better suited for client/server architectures with server located somewhere else.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • Christian EhrlicherC Online
        Christian EhrlicherC Online
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote last edited by
        #3

        There is no Qt api to access a mongoDb - you have to do it by yourself.
        Since it's a no-sql database you won't be able to use QtSql module here.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        1

        • Login

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