PDA

View Full Version : Register QtCreator on Win7?



weaver4
20th November 2010, 22:23
I have qt installed on a Win7 box and I was surprised that double clicking a *.pro file does not start QtCreator. Tried installing it again, same result.

I tried right-clicking on a pro file and selecting qtcreator.exe but win7 would not let me do that since qtcreator.exe is not a registered file. Looked in my registery and sure enouch qtcreator.exe is not listed as a valid application.

How do I get this running properly?

squidge
20th November 2010, 23:01
Either:

Open QtCreator, and then open the .pro file (the recommended way)

Or Right click, Open-With, Browse, and then choose QtCreator.exe. Then QtCreator will be registered and opened on doubleclicking a .pro file.

Typically however, .pro files are for QMake, not QtCreator, hence the reason they are not, by default, associated with QtCreator.

weaver4
21st November 2010, 02:59
Actually Win7 will not let you browse/select an exe file if the application is not registered. A change from Vista and XP.

I managed to edit the registry to get it to work.

Thanks

squidge
21st November 2010, 09:14
Really? I'm running Windows 7 and just tested what I wrote and it worked fine with both Qt Creator and one of my own applications. Upon selecting the executable, it placed the icon into the "recommended programs" dialog box for that file type.

weaver4
21st November 2010, 20:54
According to Microsoft's Knowledge Base the exe must be listed in the registry under HKEY_CLASSES_ROOT\Applications to allow you to associate it.

http://social.answers.microsoft.com/Forums/en-US/w7files/thread/8a84fcec-22df-4942-8e35-d98dbe96e327

squidge
21st November 2010, 21:38
I don't know what to say apart from "It works for me". I can associate with my own programs which are not in the registry (I've checked) and it works correctly. I'm using Windows 7 x64 Ultimate. Maybe it's because the programs are not in Program Files (they are in a subdir of My Documents).

I've checked your link and at least one person agrees with that fact, so I'm just going to assume thats the case here. It's a lot of hassle to try and manually alter the Program Files directory as it's a protected folder.

weaver4
21st November 2010, 23:32
I tried making a new type of file called *.xxr that was not associated with anything. Tried associating it with many programs, and your are right; sometime it would associate and sometimes it would not. Can't figure out the algorithm but it appears that it has to do with folders, permissions and if it is listed in the registry under HKEY_CLASSES_ROOT\Applications .

Yes
5th April 2012, 23:30
In Windows Vista and Windows 7, you can only associate file types with programs in certain folders. The Program Files folder is one of them.

There even exists a workaround for that reason, to make it possible to associate file types with the popular text editor Emacs, which is usually installed outside of the Program Files folder since its name contains a space. The program is open source and can be found here (http://sourceforge.net/projects/openwithemacs/), it should be easy to modify the code and recompile it to make it associate files with Qt Creator instead of with Emacs.