Qt Interview Questions
In this post we will look at Qt Interview questions. Examples are provided with explanation.
Q: What is Qt?
A: Qt is a cross-platform application framework and widget toolkit for creating classic and embedded graphical user interfaces, and applications that run on various software and hardware platforms with little or no change in the underlying codebase, while still being a native application with native capabilities and speed
Q: Which IDE you use for developement of Qt code?
A: Qt Creator is a cross-platform C++, JavaScript and QML integrated development environment which is part of the SDK for the Qt GUI application development framework. It includes a visual debugger and an integrated GUI layout and forms designer. The editor's features include syntax highlighting and autocompletion. Qt Creator uses the C++ compiler from the GNU Compiler Collection on Linux and FreeBSD. On Windows it can use MinGW or MSVC with the default install and can also use Microsoft Console Debugger when compiled from source code. Clang is also supported.
Q: What are advantages of using Qt Containers over STL containers?
A: The advantages are as follows -
- Qt containers are more lightweight than STL containers. They consume less memory
- Qt containers documentation is much better than STL container. So use is much easier.
- The learning curve for Qt container is comparatively less than STL container.
Q: How to print to console when using Qt?
A:
#include <QTextStream> QTextStream out(stdout); foreach(QString a, strings) out << a << endl;