'twittertimeline' example is outdated and doesn't work. Using a consumer key and secret from Twitter are not enough to make the example work. The example works if one sets Callback URL in Twitter settings. This is not instructed by the example documentation, so maybe it wasn't required at the time of making the example? It is also inconvenient that the callback URL used by the Qt app is different on each run. It is possible to read the callback URL from the Qt app using the function QOAuthHttpServerReplyHandler::callback(). (For example, place 'qDebug() << replyHandler->callback();' in Twitter::Twitter)
The sample project attached demonstrates that authentication with Twitter is possible without setting a callback URL (in Twitter). Only the consumer key and secret are needed. Maybe this sample can be utilized while revising the example.