Personal tools
You are here: Home Developer Resources Knowledgebase Is there a limit to the number of widgets I can create on Windows ?
Document Actions

Is there a limit to the number of widgets I can create on Windows ?

 


Answer:

Qt does not have any limits in that respect, but of course the operating system/graphics subsystem does and Qt cannot work around those. For example, on Windows 2000/XP you are usually limited to about 10000 GDI objects, which includes widgets, pixmaps, fonts and cursors etc.

In Qt 4 widgets or pixmaps do not use GDI objects. Widgets still have some system dependent part, the window id, which also limits us in the number of widgets one can create at the same time. Since Qt 4.2 we only allocate window id's for widgets that are shown or that otherwise explicitly need the window id. The effect of this is that you should reach the limit very seldom.

When the limit is reached, it is most likely because the application uses too many pixmaps, fonts, widgets or cursors and keep them alive at the same time. The only way to work around these limitations is to minimize the simultaneous use of these types of objects, such as deleting dialogs immediatly after they have been used and hidden, etc.

 

 

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: