Yeah, I know this is a simple C++ problem, but I cannot find an answer.
Not wanting a user to be able to instantiate a non-modal dialog more than once, I tried the following code (just like on p. 64 of C++ Gui Programming with Qt 4)
The problem is that even though a debug before the if statement shows that help is false, the code in the if statement never gets executed.Qt Code:
if (!help) { help = new HelpViewer(this); // header has HelpViewer *help; help->show(); }To copy to clipboard, switch view to plain text mode
So, what am I doing wrong here? Or is there a better method to accomplish this?


Reply With Quote

Bookmarks