alexdelphi
alexdelphi

Reputation: 79

qt executing code on creating a form

How to perform a code on creation of the main form? Say, I have to call a simple
MessageBox(0, L"Hello World!", L"Debug", MB_OK) that will be called after the form's creation but before its appearing on screen. Thanks in advance.

Upvotes: 0

Views: 98

Answers (1)

karlphillip
karlphillip

Reputation: 93468

Write a new class that inherits from this form (QWidget? QMainWindow?). Then, on the constructor of the class, execute:

MessageBox(0, L"Hello World!", L"Debug", MB_OK)

Upvotes: 1

Related Questions