How to connect MongoDB with C++ qt programming?

2,437 views
Skip to first unread message

Lakshmi Nandanan

unread,
Feb 13, 2014, 1:20:23 AM2/13/14
to mongod...@googlegroups.com
    How to connect MongoDB with C++ qt programming?Am installed the MongoDB, then i think next step is connection.ie,so how to connect with MongoDB with C++ qt?
What are the steps included in the processes?

Andrew Morrow

unread,
Feb 13, 2014, 10:04:24 AM2/13/14
to mongod...@googlegroups.com

Hi Lakshmi -

You will need to use the MongoDB C++ driver within your Qt application. You can find instructions on how to download, build, and use the MongoDB C++Driver here: http://docs.mongodb.org/ecosystem/drivers/cpp/

Detailed instructions on how to build the driver are here: http://docs.mongodb.org/ecosystem/tutorial/download-and-compile-cpp-driver/

Please let me know if there is anything else I can do to help.

Thanks,
Andrew



On Thu, Feb 13, 2014 at 1:20 AM, Lakshmi Nandanan <lakshmi...@gmail.com> wrote:
    How to connect MongoDB with C++ qt programming?Am installed the MongoDB, then i think next step is connection.ie,so how to connect with MongoDB with C++ qt?
What are the steps included in the processes?

--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
 
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Scott Deerwester

unread,
May 29, 2015, 2:05:41 PM5/29/15
to mongod...@googlegroups.com
It seems to me that the bulk of the work is mapping between various lower level types in bsoncxx::stdx and Qt. I wonder if you would consider providing a Qt-friendly API wrapper that uses things like QString/QStringRef instead of bsoncxx::stdx::string_view? I wouldn't think that it would be more than just a very thin layer on top of the existing code, and it could go a long way toward opening up MongoDB C++ to the Qt community.

Andrew Morrow

unread,
Jun 4, 2015, 3:51:19 PM6/4/15
to mongod...@googlegroups.com
On Fri, May 29, 2015 at 1:52 PM, Scott Deerwester <scott.de...@gmail.com> wrote:
It seems to me that the bulk of the work is mapping between various lower level types in bsoncxx::stdx and Qt. I wonder if you would consider providing a Qt-friendly API wrapper that uses things like QString/QStringRef instead of bsoncxx::stdx::string_view? I wouldn't think that it would be more than just a very thin layer on top of the existing code, and it could go a long way toward opening up MongoDB C++ to the Qt community.


Hi Scott -

We would need to think carefully about how to enable such a feature. One of the goals of the C++11 driver was to have no third party library dependencies, other than libbson and libmongoc. But I certainly support the goal of making the new driver easy to use with Qt.

I think the best thing to do would be to file an enhancement request in the CXX JIRA project. It wouldn't be a priority for us right now (shipping the 1.0.0 release is), but that way this idea would still be on our radar. Of course, you are welcome to send PRs as well.

Thanks,
Andrew

Reply all
Reply to author
Forward
0 new messages