Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shreyasnayak/qtramstore
Store the QtApplication temporary data in Ram data base
https://github.com/shreyasnayak/qtramstore
Last synced: about 1 month ago
JSON representation
Store the QtApplication temporary data in Ram data base
- Host: GitHub
- URL: https://github.com/shreyasnayak/qtramstore
- Owner: shreyasnayak
- License: mit
- Created: 2021-06-19T14:31:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-20T10:35:49.000Z (over 3 years ago)
- Last Synced: 2023-07-13T07:22:45.403Z (over 1 year ago)
- Language: C++
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QtRamStore
QtRamStore is a Qt C++ Libary to store and retrieve the data.
# How to build (Linux)
`qmake //QtRamStore/QtRamStore.pro`
`make`
`sudo make install`
# How to use in Qt Project
## Include library in Qt Project
```
unix:{
INCLUDEPATH +=/usr/local/include
LIBS += -L/usr/local/lib/ -lQtRamStore
}
```## Example Code
```
#include
#include
#include
const QString PageName = "Main.cpp";int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QtRamStore *dataBase = QtRamStore::GetInstance();dataBase->writeToKey("Group-1","First Name","Shreyas",PageName);
dataBase->writeToKey("Group-1","Last Name","Nayak",PageName);dataBase->writeToGroup("Group-2",QVariantHash{
{"First Name","Shreyas"},
{"Last Name","Nayak"}
},PageName);qInfo()<< "Group-1 Value : " << dataBase->getGroupValue("Group-1");
qInfo()<< "Group-2 Value : " << dataBase->getGroupValue("Group-2");return a.exec();
}```