Reputation: 1844
I have finished my first Qt application, and noticed that the QApplication constructor in the main.cpp files take up to 10 seconds to execute. This results in an annoying startup delay where I can't even show a splash screen.
When profiling this delay it turns out that the initializeMultitouch_sys method in the QApplicationPrivate class is the culprit. Specifically, the iInkTablets->get_Count(...) call takes all the time.
void QApplicationPrivate::initializeMultitouch_sys()
{
[...]
IInkTablets *iInkTablets = 0;
HRESULT hr = CoCreateInstance(QT_CLSID_InkTablets, NULL, CLSCTX_ALL, QT_IID_IInkTablets, (void**)&iInkTablets);
if (SUCCEEDED(hr)) {
long count = 0;
iInkTablets->get_Count(&count); // <== Takes 5-10 seconds!!
for (long i = 0; i < count; ++i) {
[...]
}
}
I am using Windows 7, but not utilizing any multi-touch feature. Any idea what causes this problem and how I can avoid it?
Thanks, Fabian
UPDATE 2010-11-14 - PROBLEM SOLVED
I noticed that the problem then occured with all Qt based applications, including Qt Designer. A reboot fixed it.
Upvotes: 1
Views: 366