[Qt-interest] Changing public methods to public slots

variadic.template variadic.template at googlemail.com
Sun Dec 27 01:50:10 CET 2009


Hi,

I'm currently writing an application with QGraphicsView and all these  
things, no problem
there, in general. I have the need of calling some methods of  
QGraphicsView through slots,
like centerOn(...). So I'm going to derive from QGraphicsView and wrap the  
methods
I need and writing some slots for them - and that time the question "Why?"  
hits in my face.
I think that's something common and, at the same time, very annoying.  
What's the reason
for not-declaring all/most of the methods as slots? Of course, there will  
be more things to do
for the compiler (generating *_moc and compiling it), the libraries will  
become bigger -
but the developing itself could become more efficient. Did somebody  
already try how big
the libraries would be if all (public-) methods would be slots? Are there  
any other
reasons why this approach would be a bad idea?

Hendrik




More information about the Qt-interest-old mailing list