Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Create a Gantt diagram



  • Hi everyone.
    I will like to know if you have a link where I can learn on how to implement a gantt chart using Qt. The first idea I had, was to create a QTableWidget with dates like headers of each column and I will just have to color each square (from start of a task to its end). Is that a good approach?
    Thanks to all.


  • Lifetime Qt Champion

    Hi,

    Do you want to implement it yourself ? Or if a solution already exists use that ?

    In the second case there is "KDChart":http://www.kdab.com/kdab-products/kd-chart/ from KDAB

    In the first case, you would probably better start with a custom model/view combo. The model containing your tasks data (like steps, name, dates, etc...). and a custom view rendering each tasks. Look at the Chart example in the Item Views example from the documentation to get the basics.

    Hope it helps



  • Thanks but Finally I think I will use a Gantt Chart jquery plugin that I will display in a QWebView.


  • Lifetime Qt Champion

    Ok, then this issue can be considered as solved :)

    Can you update the thread's title so other forum users may know ?


Log in to reply