qt-interest@trolltech.com
[Top] [All Lists]

Re: Why QWidget::show () is not virtual?

Subject: Re: Why QWidget::show () is not virtual?
From: Justin Noel
Date: Thu, 23 Aug 2007 10:19:04 -0400
Lingfa Yang wrote:
Why QWidget::show () is not virtual?

I want my dialog class has a clean constructor, which benefits none-gui mode. Only after I switch from none-gui to gui mode I may want to "show" the dialog. So my show means "build" and "show" --- that's why I need QWidget::show () to be virtual to hook my "build", unfortunately, it is not. Does anyone has thought on this?


You can try implementing the virtual showEvent(QShowEvent* event) and do your magic in there.

--Justin

Attachment: justin.vcf
Description: Vcard

<Prev in Thread] Current Thread [Next in Thread>