Change QWebChannel kMaximumMessageSize?
-
I'm using a QtWebEngine to display a Plotly graph in my Qt application (Pyside2, though I don't think that matters). I communicate between my app and the javascript using a QWebChannel, and I load the data from the application into the javascript graphing engine via calls to runJavaScript(). Unfortunately, sometimes when I have a lot of data to plot, my application will crash (really? A crash, not just an error? but I digress...) with the message:
[74482:775:0522/135240.108745:FATAL:ipc_channel_proxy.cc(540)] Check failed: message->size() <= Channel::kMaximumMessageSize (134731808 vs. 134217728)
or similar. How can I fix things so this doesn't happen? Is there a better way to transfer large amounts of data from the application side to the JavaScript side than using runJavaScript? If nothing else, what maximum length (since in my testing it doesn't appear to be that 134217728 number) string should I test for before calling runJavaScript so I can give the user a polite error message and tell them to change their parameters rather than crashing?