Public Service Announcement: YouTube links now include an SI source id at the end which is unique to your account if you share link on another non-Google platform. Be sure to delete everything from the “si=” onward or it will be easily traceable to your Gmail @OldRowSwig on X
I tend to always forget how to use prepared statements, so I generated this little helper function that always does what I typically want. (untested 2023-09-04) #include <QSqlQuery>#include <QSqlError>#include <QVariant>#include <QMap>#include <QDebug>#include <QSqlDatabase>/** * Executes an SQL query with placeholders. * * @param sqlString The SQL query string with placeholders. * @param placeholderMap A map […]
Checkout on GitHub This is a dialog. There’s really nothing very particular about it; just that it’s been done well for a particular use case, where users need to be nudged to be aware of what they’re doing. In this current implementation, sufficiently technical users are able to extract the password but that isn’t the […]
Checkout on GitHub Sometimes you can end up in a situation where you have multiple little apps (Qt projects) as part of a bigger project. So you may have started out with multiple translation files, but really, you want a single common translation file between projects so they share a vocabulary. So how do you […]
In my layout, my dynamically generated QTableViews seem to get resized to only show one row. I want to have the container of the table views to have a scrollbar instead of the individual table views, which should show full contents. Qt doesn’t have anything built in for this apparently, you need to calculate and […]
I finally got sick and tired of all my windows laptops breaking physically one way or another. First there was ThinkPad Edge, then there was the ultrathin Sony Vaio (bought just before Sony sold the business and discontinued the thing). Developers, Linus Torvalds included, online seemed to agree that MacBooks are the best hardware on […]
A sleeping calendar for circadian rhythm disorder patients (G47.2). Built for a friend in 2012. This is a simple single page PHP script. A key reason this is listed is to demonstrate that often it doesn’t take complex tech or extreme polish to meet a need and provide a lot of value.
Spend as much effort as possible in learning to use Qt’s Model View Delegate functionality. It can be a lot of work to wrap your head around, but once you get there, you can do very powerful things with it.
You would guess this would be pretty trivial. Guess again. I was looking for a way to map a radio buttons to a QDataWidgetMapper as per this forum thread.
Authors: Olli Savolainen and Daniel Schildt Olli: In my opinion, it is important in the teaching of programming fundamentals to focus on the essential: Learning what will help you get started quickly and implement your own ideas. This is particularly challenging with C and C++ languages, teaching of which is sometimes still needed. When a […]
For unit testing, I needed to read ForceProof project database into an in-memory SQLite database, from a .sql text file. Turns out, Sqlite (at least in Qt) is unable to execute multiple statements in one string.
A playful experiment in online advertising; a simple “personality test” . It was featured on a local radio station sometime around the year 2006, and gained quite a bit of traffic due to that. It got me some hundreds of euros in the oughties to support my studies. After placing the ads, the total impressions […]