User talk:Olympio

From Nokia Developer Wiki
Jump to: navigation, search

Hi Olympio,

I saw your camera mirror example and fixed the some mistakes I spotted in the code.

  1. Using QTextStream to construct a QString is not required. It slows things down. QString, in contrast to i.e. Java's string class, does efficient concatenation.
  2. The way you were using QApplication::translate() would not have worked. I don't really see why one would want to translate the style sheet in this particular situation anyway.

I couldn't find the source code, but it would be nice if you could incorporate those fixes.

Some other things I saw:

  1. Using symbian native code is not supported by the Nokia Qt SDK (I know it's needed, but if it works, it only works by chance). Instead, QApplication::desktopWidget() emits the resized(int) signal.
  2. Do not ever use setGeometry() to position an item. use QLayout.
  3. Even more than annoying users, calling sleep() will block the event loop.
This page was last modified on 7 June 2010, at 18:06.
14 page views in the last 30 days.