[Qt-interest] Is there a QT equivalent to MFC:s on_command_update_ui?
Constantin Makshin
cmakshin at gmail.com
Tue Dec 15 15:34:18 CET 2009
Take a look at QMetaObject::connectSlotsByName() function.
On Tue, 15 Dec 2009 17:18:22 +0300, Gabriel Ortiz <gor23 at hotmail.com>
wrote:
> Hi. I'm new to QT with a background in MFC programming. I'm just
> wondering if there is there a QT equivalent to MFC:s
> on_command_update_ui? I.e. a way to write a single update handler to
> handle things like enabling, checking/unchecking menu items etc and that
> is called automatically by the framework? If not, is there any best
> practise?
>
> I did a lot of MFC programming a few years ago. As I recall it,
> on_command_update_ui was a quite handy mechanism, although the message
> routing in MFC is intricate.
>
> I've found that it difficult to get it right when you have to manually
> add calls to "setEnabled" each time the GUI changes state, especially
> when there are complex state machines with many possible state
> transitions.
--
Constantin Makshin
More information about the Qt-interest-old
mailing list