Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load a Git clone into QtCreator

I'm very new to using any sort of version control with QtCreator, so I'm sure I'm just making a rookie mistake, but here goes:

I am able to create a clone of a repository (https://github.com/dsacre/klick.git). All of the files are there. The problem lies with getting this clone into QtCreator for me to mess around with.

I go about making a clone through File -> New File or Project -> Import Project -> Git Clone

I enter https://github.com/dsacre/klick.git on the "Repository" line and then hit Next.

The following text is then displayed:

Cloning into 'klick'...
remote: Counting objects: 1223, done.        
remote: Total 1223 (delta 0), reused 0 (delta 0), pack-reused 1223        
Receiving objects: 100% (1223/1223), 407.30 KiB | 29.00 KiB/s, done.
Resolving deltas: 100% (923/923), done.
Checking connectivity... done.
Succeeded.

Then, when I click Finish, a dialog box appears, saying "Failed to open project in /home/tylrrc/klick" and "No file to open found in /home/tylrrc/klick". When I look in /home/tylrrc, I can see /klick and all of the files it contains.

What am I doing wrong here?

Does QtCreator require a special type of file to be present in a project before it can open it?

like image 494
TylrRC Avatar asked Feb 03 '26 11:02

TylrRC


1 Answers

In addition to Vladimir's answer, there is a built-in automatic way to do this.

You can import the project.

  1. Click File->New File or Project .... This will open the following dialog. Select the option Import Project->Import Existing Project, as shown below.

enter image description here

  1. Next give the name and path (/home/tylrrc/klick in your case) for your project.

enter image description here

  1. You can select if you would like particular file extensions to be included or excluded from the view/project. If you are not sure, (and probably for most simple projects), it is enough to just go ahead with the defaults suggested by QtCreator.

enter image description here

  1. Finally include (or not) your Qt project files to the Git repo.

enter image description here

Depending on how simple your project structure is, you may be able to build your project now from within QtCreator.

EDIT:

I noted that the build-system used in the project is scons. As per the documentation on this page, the above import steps should work for you.

like image 150
Duck Dodgers Avatar answered Feb 05 '26 23:02

Duck Dodgers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!