Now that would be the feline's derrière...
Any chance of something like that coming in the not so distant future?
Database support a la Evelevatesoft's Web Builder
-
- Posts: 2
- Joined: Sun Jun 28, 2015 6:43 pm
Re: Database support a la Evelevatesoft's Web Builder
How does it works ? Is there a client side database ? If yes, how do they ensure it doesn't get deleted between browser session ? Adding a DB support isn't really a problem (there is even SQLite for Javascript), the issue here is to backup the file.
-
- Posts: 2
- Joined: Sun Jun 28, 2015 6:43 pm
-
- Posts: 229
- Joined: Sat Mar 01, 2014 3:02 pm
Re: Database support a la Evelevatesoft's Web Builder
I've just been going through some of the examples that come with QtCreator, amongst them is the QtWebChannel demo.
It shows how you can use the QWebSocketServer and QWebChannel Qt classes in conjunction with a client side library, qwebchannel.js, to bridge the gap between server and client. On the server side you create classes that descend from QObject to build the functionality you require and register them using a QWebChannel. On the client side you open a web socket, create a new QWebChannel (presumably defined in qwebchannel.js) and then write a little JavaScript to make your object(s) from the channel available in the client, e.g:
It's almost like magic 
It shows how you can use the QWebSocketServer and QWebChannel Qt classes in conjunction with a client side library, qwebchannel.js, to bridge the gap between server and client. On the server side you create classes that descend from QObject to build the functionality you require and register them using a QWebChannel. On the client side you open a web socket, create a new QWebChannel (presumably defined in qwebchannel.js) and then write a little JavaScript to make your object(s) from the channel available in the client, e.g:
Code: Select all
var socket = new WebSocket(url);
socket.onopen = function() {
new QWebChannel(socket, function(channel) {
// make dialog object accessible globally
// dialog is the custom class descended from QObject
window.dialog = channel.objects.dialog;
....
});
}
