Qt Forum

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

    Unsolved c++ template

    C++ Gurus
    3
    6
    1665
    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.
    • missy
      missy last edited by

      How do i remove : int main(int argc, char *argv[]) and substitute : int main()

      1 Reply Last reply Reply Quote 0
      • Chris Kawa
        Chris Kawa Moderators last edited by Chris Kawa

        Do you mean you want to modify the project template when you choose "Plain C++ application" in Qt Creator's new project wizard?

        If that's the case then you can edit the templates in the Qt Creator's directory. For plain c++ app the file you want to modify is
        <QtCreator install dir>/share/qtcreator/templates/wizards/projects/plaincpp/main.cpp.

        1 Reply Last reply Reply Quote 1
        • missy
          missy last edited by

          i am on a mac os 10.11 There is no QtCreator install dir>/share/qtcreator/templates/wizards/projects/plaincpp/main.cpp.
          There is a qtcreator but clicking that executes qtcreator. Any other suggestion .Please help

          1 Reply Last reply Reply Quote 0
          • Chris Kawa
            Chris Kawa Moderators last edited by Chris Kawa

            I used <QtCreator install dir> as a placeholder. It's the directory where Qt Creator is installed. I don't know what that is on your computer.
            I know nothing about macs but I imagine there is a way in that OS to find files/folders right?

            1 Reply Last reply Reply Quote 0
            • hskoglund
              hskoglund last edited by hskoglund

              Hi I am also on 10.11, in my case the file is the directory /Users/henry/Qt/Qt Creator.app/Contents/Resources/templates/wizards/projects/plaincpp and it is called main.cpp

              Edit: if you cannot go inside Qt Creator.app using Apple's Finder, try right-clicking and select "Show Package Contents"

              1 Reply Last reply Reply Quote 1
              • missy
                missy last edited by

                hskoglund
                This is absolutely correct Thank you very much

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