Seriously. I don’t know how I ever created a Qt user interface without using stylesheets. This was, by far, the best idea Trolltech ever had. For today’s show-and-tell, I give you a nifty-looking QSlider with some nice gradient style applied to it: The handle has a nice hover effect, the bar has a moving gradient […]
I’ve encountered this problem a handful of times over the past few years using Qt’s layouts. Qt generally does a great job making sure that your Windows cannot be resized too small such that your content would be truncated. However, it seems that introducing a QStackedWidget causes a problem. These two screenshots illustrate the issue: […]
I wrote about multi-threading in Qt a while back, and how to use QThread to wrap a blocking function call “lock free”. Today we’ll talk about how to pass data into your thread. This approach can be used, for example, to tell your QThread to stop. There are two ways to use QThread, with and […]
Today my friend Cliff showed me his first-person video R/C airplane: This thing has every feature imaginable, which means it packs a lot of wires: Here’s a video tour of all its features, which include the following: Auto fly-home if control is lost (uses GPS) Heads up video display of altitude, heading, and pitch RF […]
The iPhone doesn’t (easily) let you change the colors of your calendar items. Couple this with the fact that there are lots of ways to setup calendar sync’ing, and it’s easy to get discouraged. For me, my work calendar and my personal calendar both showed up as nearly the same shade of red. Fail. Here’s […]
I’ve recently seen some confusion about the terms functional and procedural in the software development community. Let me spend a moment trying to clear things up for (both of) my readers. First of all, just because a programming language has functions, that does not mean it is functional. In fact, its confusing name has nothing […]
My brain’s been a stewing about 2010, and I just gotta let it all out. If I’m even half right, 2010 will be awesome. 1. Hulu in the Living Room In 2010, Hulu will partner with a company like Western Digital or Popcorn Hour to release a tiny box that connects to your HDTV to […]
Earlier this year, a shiny new iMac graced my home (increasing my resale value by about 10%, according to Zillow). Since then, I’ve had to replace my keyboard three times due to drool damage. It happened again tonight, this time compliments of the Time Machine menu bar icon (I know, it’s a curse). I noticed […]
I finally took my newly built Stryker to the slope for some unpowered slope gliding at Ensign peak in Salt Lake City, Utah. I built the Stryker with these parts: Stryker Fuselage from ParkZone A tiny 2-cell LiPo battery Two cheap servos A cheap voltage converter I did not put a motor on the Stryker […]
Qt’s powerful stylesheet system can make your boring progress bars look really cool. Screenshot: Here’s the code: QProgressBar { border: 1px solid black; text-align: top; padding: 1px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #fff, stop: 0.4999 #eee, stop: 0.5 #ddd, stop: 1 #eee ); width: […]