The C++ and QML APIs are peers and can be used per your preference - this is in contrast to Qt Quick, where the only the QML API offers the full functionality.īoth Qt Quick 1 and Qt Quick 2 can wrap existing widgets at very modest performance cost, but you do lose out on some of the niceties of "native" QML objects.ĭo note that there's a separation between the need for an OpenGL implementation and there being one provided on your system. It makes it easy to implement user interaction with 3D objects. The 3D module, exposed both via C++ and QML APIs, is a high-level 3D object and scene rendering system, tailored for interactive applications. Qt 5.11 brings in a new Javascript engine again, twice as fast. Qt 5.2 brings in an entirely new Javascript engine and a new scene graph renderer, with even better performance. The new scene graph can really leverage the hardware and will outperform both widgets and Qt Quick 1 when you have heavy animated UIs. There is a desktop components set that gives you platform-styled controls like combo boxes, text inputs, tables, etc. Qt Quick 2, uses a new OpenGL ES-based scene graph and can run on top of either a widget from the widgets module, or a raw window from the gui module. There is good support for animations/fluidity in the interface. It will look all the same no matter where you run it. The controls are fairly rudimentary and there's no platform-specific styling. Qt Quick 1, uses the QGraphicsView widget from the widgets module to display a graphical scene. It is possible to parallelize the painting of a widget. You have a multitude of pre-written widgets to do user input/output of all kinds. The widgets are so-called alien widgets - it means they don't have native window handles.
This is the model perhaps most like MFC, although it has much more functionality. The Widgets module gives you Qt4-style widgets and layouts, with customize-able styles.
It is possible to parallelize the painting of a QRasterWindow in the same way as it is done for QWidget. In terms of graphical primitives it is more akin in spirit to Cairo or PDF. The provided concepts are at a higher level of abstraction than typical platform toolkits like winapi or xlib. You draw everything where you want it to be within that window. but there's no notion of a widget, only of a top-level window. The graphical primitives are neat, with fonts, painter paths, gradients, etc. This would be the fastest way to port an existing application from "back then". You have access to the buffer of the window and to key/mouse events.
The Gui module that is similar to what you got with a very good 2D graphics library in the late 1980s/early 1990s. The style sheet file (default.Qt 5 gives you essentially five (5!) UI toolkits: QString styleSheet = QLatin1String(file.readAll()) QPushButton* pButton = new QPushButton("Test", pWindow) QVBoxLayout* pLayout = new QVBoxLayout(pWindow) On my Mac, my whole application window is black (except the title bar).ĮDIT : according to comment, here is a solution without using ui files and loading an external style sheet #include This->setStyleSheet("background-color: black ") I would simply use a Style Sheet for the whole window.įor instance, if your window is inheriting from QWidget, here is what I'm doing : MainWindow::MainWindow(QWidget *parent) : QWidget(parent), ui(new Ui::MainWindow)