Qt World Summit: Register Today!

BEGINNER: Is it wise to use standard POSIX & Pthread stuff, or should I go all Qt?

  • I'm totally new Qt. We've got ourselves a little embedded Linux display/keypad that comes with Qt4 and Qt Creator.

    I'm quite experienced with writing standard user space applications with pthreads and typical POSIX device driver stuff. With this application, we need to get stuff on the display of course, capture button press events, and interact with another device via a serial port.

    Since we have Qt4, it seems there is some complication in using QtSerialPort (in that it's not part of Qt4). Is it sane/normal/common to create applications with Qt Creator, but include in the application hand crafted code that does the whole POSIX open/close/read/write caper to control a serial port? Likewise is it sane/normal/common to make pthread calls from an applicaiton created by Qtcreator? (Not interested in portability to other OSes.)

    Or is this just swimming against the tide too much, and I should just fall into line, do everything through Qt libraries, and embrace the whole signal and slots magic?

    We need to get something together quickly. Customer demo 5 minutes after getting the device. Typical situation. Qt greatness can follow at a later date.

  • Moderators

    Qt is still C++, so you can use posix and other external APIs without a problem, especially if makeing it cross-platform is not needed at that point. Qt Creator is just an IDE. And installing QtSerialPort is actually very easy.

Log in to reply