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

should i split the one file into separate files?



  • i have a file named informationTree.h. i declare a the following classes in in:

    1. informationTreeHeader (is QHeaderView)
    2. informationTreeItem
    3. informationTree (is QTreeView)
    4. Type1InformationTree (is informationTree)
    5. Type2InformationTree (is informationTree)
    6. informationTreeView (is QWidget) (for holding the tree)

    i feel like this is all too much for a single file. should i split it into multiple files? if so, in what way?



  • @user4592357 You do not have to do something like that. It is okay if you have 1000+ functions and stuff.



  • @user4592357 maybe today you do think that you do not need it to be split.. but from my own experience is a lot better - the code grows with the time, you will bring new improvements to it.. so it has to be as easy to manage it... doing something properly from the beginning it will be easy to manage it when is big...
    so my advice is to split it into different files and then you can work easily with it - to update it and maintain it



  • @arsinte_andrei
    yeah. i think bullets #4, 5, 6 should go into one file, and what about 1, 2, 3?


Log in to reply