Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is there a workaround for this ?
Qt 6.11 is out! See what's new in the release blog

Is there a workaround for this ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.8k Views 1 Watching
  • 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.
  • MathsM Offline
    MathsM Offline
    Maths
    wrote on last edited by
    #1

    In QT Creator, When you go to : File-->New File or Project --> NON-QT Projects --> Plain C Application --> Choose-->Enter a Name for Project-->Next-->Next-->Finish

    (1)the default file created is main.c and it contains :

    #include <stdio.h>

    int main(int argc, char *argv[])
    {
    printf("Hello World!\n");
    return 0;
    }

    I want main.c to be empty.
    is there a way to make main.c empty when we open a plain C application project ?

    (2) Why is it that there are no items in Class View when I choose "class view" from the drop down list at the top left corner ?(when you create a plain C++ project with the default main.cpp in it and a few other classes thrown in )

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by Chris Kawa
      #2

      Hi, welcome to the forum.

      1. You can go to the <Qt Creator install dir>/share/qtcreator/templates/wizards/projects/plainc directory and edit the main.c template file to be whatever you want.

      2. It works for me. Which build system/compiler/OS do you use?

      1 Reply Last reply
      1
      • MathsM Offline
        MathsM Offline
        Maths
        wrote on last edited by
        #3

        Thanks for answering number (1).

        Regarding number (2), I choose Cmake as my build system...would that be a probable cause ? I also cant add any files to my project under the "Projects" Drop Down list

        1 Reply Last reply
        0
        • MathsM Offline
          MathsM Offline
          Maths
          wrote on last edited by
          #4

          Windows 7 64 bit , Cmake , QTC 4.0.1, QT 5.6.1

          planning to install QTC on Ubuntu MaTE 64-bit with GCC/G++

          1 Reply Last reply
          0
          • Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by Chris Kawa
            #5

            AFAIK CMake integration is getting better but is still a work in progress. Some stuff works, some doesn't. See the docs for an overview what's already implemented. If I'm not mistaken adding files is done by editing the CMakeLists.txt.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved