qtチュートリアル

ぼちぼちQtを覚えていこうと思う。しかしQtチュートリアル(日本語)の最初のサンプルコードをビルドした所いきなり以下のエラーを食らった。

error: 'class QApplication'  has no member named 'setMainWidget'

調べてみるとQApplication::setMainWidget()はQt3系の関数でQt4系では撤廃されたそうだ。チュートリアルしょっぱなからバージョン互換性の罠があるとはQt恐るべし。

I tried to build the first code of Qt but I got an above error. There is a version dependency in the first code in the tutorial. I haven't thought that there is such a change in a frequently used code.