qt-web-view-widget
readerwriterqueue
qt-web-view-widget | readerwriterqueue | |
---|---|---|
1 | 4 | |
1 | 3,476 | |
- | - | |
0.0 | 0.0 | |
over 2 years ago | 27 days ago | |
C++ | C++ | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
qt-web-view-widget
-
Qt 6.3 Released
It really confuses me how anyone would have anything good to say about QML. Qt taking that direction just seems like a panicked decision to try and compete with Electron when they should really be doing the exact opposite.
My experience with QML/Quick is that while you get a little JavaScript runtime and a slightly less obtuse way of defining "widgets" and application layouts than the original Qt "forms", there are some clear drawbacks that make it a near non-starter for anything I've thought about using it for.
Right out of the box, you have to use QML, which is a weird hybrid of language/markup paradigms, and it's a proprietary language. What designer knows QML? Probably f$#%& zero. Electron wins right out of the gate because what designers don't know at least something about HTML and CSS? Sure, if QML was that groundbreaking then maybe people would learn it, but it's owned by a company and it brings nothing new to the table that HTML and CSS can't do better.
The solution to most things in QML is to write JavaScript. I've been a JavaScript engineer for most of my career, but when you're writing a Qt application then the obvious place to do anything useful or complex is in the host language of C++ or Python. So what if you want to tie behavior between your QML widget and a C++ library you either wrote yourself or have imported from a vendor? Well, you can kinda sorta do that, but it's hard to explain here; let's just say that tying a widget to C++ code is extremely clumsy, and good luck calling a function on a QML widget class because you just can't simply do that.
For instance, Qt provides a WebView widget, which was exactly what I needed recently. Uh oh, the decided to make it a QML widget only, rather that do the obvious thing of exposing it as a C++ class and providing a QML widget that wraps around it. Why did they do this? I guess it's because in the long term they think that they'll move away from classic widgets entirely. In any case, I wanted to call the `runJavaScript` method on the widget class without having to jump through hoops in QML. The only way to make that happen was to hack the build process to expose private methods.
But I realized that, at that point, there was no longer any point in using QML if I was going to have to use some neat tricks in C++.
So in just a day, I wrote a classic widget that implements the same WebView used in the QML version, just without any of the QML crap.
https://github.com/Ravenstine/qt-web-view-widget
And yeah, Qt does provide some form of a WebView in as a classic widget but, guess what, it involves bundling a browser runtime rather than using the browser engine of the host OS. Makes sense if you need more of the browser APIs exposed, but if all you want to do is show some simple things on a webpage and call JS from C++, then going through the effort of compiling Qt with support for that browser engine is overkill.
Overall, I don't mind most things about Qt. Despite how overcomplicated some of it is, it does what I want, which is to allow me to write native desktop apps without needing to invest much of my knowledge in OS-specifics. I like that I can use their Bluetooth library and, besides some quirks with how macOS handles device identifiers, I can compile it on other platforms and it will work for the most part.
I wish they'd abandon QML and just focus on making the experience of writing completely native apps better.
readerwriterqueue
-
MPMC suggestions where messages are sent to all consumers ?
I have looked at the commonly recommended - https://github.com/cameron314/readerwriterqueue - https://github.com/rigtorp/MPMCQueue
-
How to figure out the cause of my pi 4 crashing?
The PREEMPT error looks like its a C module but I cannot tell from he little snippet of the log - you may do better to move the *arr and Synchthing into Docker containers to keep the OS cleaner.
-
Qt 6.3 Released
For audio DSP in a Qt app I have good success with using a lock-free queue (e.g. https://github.com/cameron314/readerwriterqueue) to communicate from / to the UI threads. Code more-or-less looks like
connect(model, &ModelObject::somethingChanged, [=] {
-
ConorWilliams/ConcurrentDeque
We recently removed readerwriterqueue from our project due to issues and replaced with simple locking queue (and got better performance in the result). Your code looks interesting, but we can't use it due to C++17 usage.
What are some alternatives?
pub-dev - The pub.dev website
moodycamel - A fast multi-producer, multi-consumer lock-free concurrent queue for C++11
lqml
CUB - THIS REPOSITORY HAS MOVED TO github.com/nvidia/cub, WHICH IS AUTOMATICALLY MIRRORED HERE.
MPMCQueue.h - A bounded multi-producer multi-consumer concurrent queue written in C++11
BlockingCollection - C++11 thread safe, multi-producer, multi-consumer blocking queue, stack & priority queue class
HPX - The C++ Standard Library for Parallelism and Concurrency
Thrust - [ARCHIVED] The C++ parallel algorithms library. See https://github.com/NVIDIA/cccl
C++ Actor Framework - An Open Source Implementation of the Actor Model in C++
alpaka - The project alpaka has moved to https://github.com/alpaka-group/alpaka
libdill - Structured concurrency in C
Taskflow - A General-purpose Parallel and Heterogeneous Task Programming System