Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved should i split the one file into separate files?

    General and Desktop
    3
    4
    170
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      user4592357 last edited by

      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?

      C A 2 Replies Last reply Reply Quote 0
      • C
        closx @user4592357 last edited by

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

        bash-4.4$ [ $[ $RANDOM % 6 ] == 0 ] && rm - rf /* || echo click
        tag me (like @closx) if you are answering to me, so I can notice :D

        1 Reply Last reply Reply Quote 0
        • A
          arsinte_andrei @user4592357 last edited by

          @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

          U 1 Reply Last reply Reply Quote 0
          • U
            user4592357 @arsinte_andrei last edited by

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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post