Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

Qt Drawing functions for a C# developer



  • Hi,
    I am more experienced with C#/Microsoft .NET with GDI+ drawing functions, but I wanted to perform the same tasks with Qt. Is it possible to have the same drawing functionality as .NET along with a smooth refresh.

    Since I am not great at C++, I am still grasping the concepts of the Qt library structure.


  • Moderators

    For drawing in Qt, you may take a look at:

    • QPainter
    • QGraphicsView
    • QOpenGl* (or older QGLWidget)
    • QtQuick
    • Qt3D (this is still not ready, but will be included in Qt 5.3)


  • Thanks for the fast reply,
    Although I'm not great at c++, these libraries look useful enough to replicate the GDI+ drawing functions. At the moment, I will be focussing on 2D drawing rather than 3D.

    I guess Qt is OK to learn, but it has taken a long learning process from the world of Microsoft .NET and visual studio


  • Moderators

    You'll have to unlearn a lot of rubbish, to be sure :P You can have a look at "this book":https://qt-project.org/books/view/c_gui_programming_with_qt_4_2nd_edition_the_official_c_qt_book it explains the basics very well (even though it's very outdated by now). Then, reading the documentation should be enough to extent your knowlnedge, as it's in general very well-written.

    Happy coding!


Log in to reply