Problem

The only problem that manifested itself from time to time was an extremely long switching time for a certain (not very complicated) measurement's tab. At first, I ignored it and blamed the MFC code that was apparently blocking Windows message pump, but after this error started showing up more regularly, I decided to investigate it properly.

As it turned out, this special measurement displayed a list of possible frequencies to be chosen from as a QTableView. When I programmed it, it didn't look very grave – how many frequencies could there be for a measurement? However, when I was testing, it turned out that these frequencies were set in another, seemingly unrelated measurement tab. Did I mention that the application was rather complicated? The user would define a measurement range, but the default step was 0.1 Hz. Thus, for some greater measurement ranges, this amounted to literally thousands of frequencies to be shown! Even if that wouldn't make sense for a measurement, this was a legitimate choice and should be displayed in another tab!