Qt-interest Archive, March 2007
Strange startup problem of QT4 on Windows XP
Message 1 in thread
Hi,
I have a program that make use of QT4 as the GUI. During startup, it
reads in a configuration file and creates a series of GUI components that
are inherited from QT GUI classes (QFileDialog, etc.). However, on my
desktop machine (Pentium D 820 CPU running Windows XP sp2), the startup is
very slow. Tracking into the source I found that it is due to slow
constructions and operations of the inherited QT classes. I have built the
program with QT 4.1.4, 4.2.2 and 4.2.3, and they have the same problem. On
another desktop machine with same hardware and same operating system, the
program has the same problem. However, on two laptop computers with the same
OS, the program has no problem. I have also tried to run the QT demos
bundled with the QT source code on the problematic desktop machine, and the
demos all work fine. So here is a strange problem. It seems that my program
(and also QT) have troubles on a particular hardware/software configuration.
Does anybody have similar experiences before? How can I fix it? Thank you
very much!
Eric
Message 2 in thread
On 27.03.07 08:31:41, Eric wrote:
> I have a program that make use of QT4 as the GUI. During startup, it
> reads in a configuration file and creates a series of GUI components that
> are inherited from QT GUI classes (QFileDialog, etc.). However, on my
> desktop machine (Pentium D 820 CPU running Windows XP sp2), the startup is
> very slow. Tracking into the source I found that it is due to slow
> constructions and operations of the inherited QT classes. I have built the
> program with QT 4.1.4, 4.2.2 and 4.2.3, and they have the same problem. On
> another desktop machine with same hardware and same operating system, the
> program has the same problem. However, on two laptop computers with the same
> OS, the program has no problem. I have also tried to run the QT demos
> bundled with the QT source code on the problematic desktop machine, and the
> demos all work fine. So here is a strange problem. It seems that my program
> (and also QT) have troubles on a particular hardware/software configuration.
> Does anybody have similar experiences before? How can I fix it? Thank you
> very much!
This indicates that the classes you create take much time during
construction on certain machines. You didn't specify what type of laptop
you used, also you didn't show any code that is executed so somebody
could check it. Without more information its impossible to say anything.
Andreas
--
[ signature omitted ]
Message 3 in thread
Hi,
> I have a program that make use of QT4 as the GUI. During startup,
> it reads in a configuration file and creates a series of GUI components
> that are inherited from QT GUI classes (QFileDialog, etc.). However, on
> my desktop machine (Pentium D 820 CPU running Windows XP sp2), the
> startup is very slow. Tracking into the source I found that it is due to
> slow constructions and operations of the inherited QT classes. [...]
How did you find that? Also I don't understand whether time is spent in
the functions defined by of your own classes, or the functions defined
in the base Qt classes themselves?
How many "GUI components" are created?
Couldn't that creation be delayed? For example these GUI components may
be lazily constructed when they're needed, not at startup.
--
[ signature omitted ]
Message 4 in thread
Hi,
I've finally found that it is due to the improper BIOS setting of the
desktop machines. Both two desktops in problems have no floppy drive. But
their BIOS have been set to indicate that they have 1.44' floppy drives.
During startup, the class inherited from QFileDialog calls the QFileDialog
constructor. Tracking into the QT sources, i found that inside the
constructor of QFileDialog, QT checks the status of the devices of the
system, including the non-existing floppy drive, and it takes a long time.
Setting the BIOS floppy option fixes this problem. Really surprising......
2007/3/27, Eric <dengbl@xxxxxxxxx>:
>
> Hi,
>
> I have a program that make use of QT4 as the GUI. During startup,
> it reads in a configuration file and creates a series of GUI components that
> are inherited from QT GUI classes (QFileDialog, etc.). However, on my
> desktop machine (Pentium D 820 CPU running Windows XP sp2), the startup is
> very slow. Tracking into the source I found that it is due to slow
> constructions and operations of the inherited QT classes. I have built the
> program with QT 4.1.4, 4.2.2 and 4.2.3, and they have the same problem. On
> another desktop machine with same hardware and same operating system, the
> program has the same problem. However, on two laptop computers with the same
> OS, the program has no problem. I have also tried to run the QT demos
> bundled with the QT source code on the problematic desktop machine, and the
> demos all work fine. So here is a strange problem. It seems that my program
> (and also QT) have troubles on a particular hardware/software configuration.
> Does anybody have similar experiences before? How can I fix it? Thank you
> very much!
>
> Eric
>
Message 5 in thread
Hi,
> I've finally found that it is due to the improper BIOS setting of
> the desktop machines. Both two desktops in problems have no floppy
> drive. But their BIOS have been set to indicate that they have 1.44'
> floppy drives. During startup, the class inherited from QFileDialog
> calls the QFileDialog constructor.
Yes, that's a known issue with QFileDialog:
http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=139567
It's not necessarily a question of improper BIOS settings, although
modifying BIOS settings may indeed work around the problem.
--
[ signature omitted ]