mailto Contact Us
Login | Register
ICS Network - Hall of Fame

The ICSNetwork Challenge Hall of Fame


Q1.  When defining a Qt class with slots, the keyword "slots" is used. But in the Qt header file <qobjectdefs.h>, "slots" is defined to be an empty string. So why do we need to use the "slots" keyword?

A1.  The "slots" keyword is used by the moc meta-object compiler to identify slots so it can generate the meta-object information for them.

And the winner is:
Jonathan Brady
Birkenhead, Wirral, UK

 

Q2.  QGraphicsView came from the earlier QCanvas framework. What project did QCanvas come from?

A2.  QwSpriteField, written by Warwick Allison.

Q2 Bonus.  How fast is Graphics View collision detection?

A2 Bonus.  O(n log(n))

And the winner is:
Austin Bowman
Gateshead, UK

 

Q3.  What two new components of Qt 4.4 originally came from the KDE project?

A2.  WebKit and Phonon

And the winner is:
Pierre Poulin
Montreal, QC Canada

 

Q4a. How many design patterns can you think of that are used in QObject? Name them.

A4a.  Composite, Reflection

Q4b. Which design patterns help you implement lazy copy on write?

A4b.  Flyweight, Proxy, Bridge

Q4c. How can the strategy pattern get rid of switch statements?

A4c.  Use virtual function calls instead.

Q4d. Which design pattern helps you implement undo/rollback/journaling?

A4d.  Command pattern

Q4e. What is common to behavioral design patterns?

A4e.  They describe how to organize code.

Q4f. What is common to structural design patterns?

A4f.  They describe how to organize objects.

And the winner is:
Renauld Guezennec
Arles, France

 

Q5. If you were to show data in a list as a bar graph, what class would you sub-class to get started?

A5.  QStyledItemDelegate

And the winner is:
Pierre-Étienne Messier
Broussard, QC Canada

 

Q6. If you look at the Qt source, the class QWidget has only one private non-static data member. This is surprising for a class that holds so much information. There is, in fact, a technical reason for this. What is it?

A6.  All data members of QWidget are in a separate class, accessible only through a private member of QWidget: the d-pointer. This technique, known under various names (d-pointer, Pimpl, handle/body or Cheshire Cat) is used because adding data members directly to the QWidget class between versions of the Qt library would break binary compatibility. For more information, see http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++

And the winner is:
Ron Natalie
Herndon, VA

 

ICSNetwork

The place to learn advanced techniques for developing with Qt.

The latest topic is:
"Best Practices for Qt Programming"


Learning Center:


 

Contact Us | Quote Request | Privacy Policy | Site Map | Trademarks | Other ICSs
© 1999-2009 Integrated Computer Solutions, Inc.