opening a .ui file created in Designer in Visual Studio
Hi,
I am using Qt 4.5.1 and Visual Studio 2005.
I notice that when I create a new .ui file in designer, then add it to Visual Studio.
In VS, I rgt click the .ui file/ Properties, and add the Custom Build Step command
Quote:
"%qtdir%\bin\uic.exe" "$(InputPath)" -o "$(InputDir)ui_$(InputName).h"
I make the other necessary changes for the .h file, and it compiles and runs fine.
But if I were to open this file in VS, it gives me an error and displays the xml code instead.
i.e. In Visual Studio, I goto <project name>/Forms/myFile.ui and double click this file. The error I get is
Quote:
Warning:
The file </Forms/myFile.ui> cannot be opened with the Qt 4 form editor.
Try converting the file using uic.exe
What could be the issue?
Thanks.
Re: opening a .ui file created in Designer in Visual Studio
Can you open the file with Qt Designer?
Re: opening a .ui file created in Designer in Visual Studio
It sounds like you are using an old version of Qt Visual Studio integration. You need to contact Nokia with your appropriate license details for an updated version of the application.
Alternatively, you can download the free VS integration tool from Nokia's website.
If you wish to do neither, you can normally get the ui files to open by deleting the first line.
Re: opening a .ui file created in Designer in Visual Studio
Wyosta: Yes I can open it from Qt Designer
fatjuicymole:
I have installed the correct licensed QT integrator, thats why I am suprised it doesn't open.
But thanks for your suggestion, I deleted the first line, and 'voila' it opens! I haven't tried integrating this code, but it won't cause any other side-effects will it? (because the first line with the xml statement is removed?).
Re: opening a .ui file created in Designer in Visual Studio
Both designer and the VS built in form editor will accept the file, but you need to remember that if you open a ui file in designer and then save it out again it will re-add the top line, so the file will no longer open in Visual studio again.
If you are possitive you have the latest version of the integrator, you need to contact Nokia Qt support team with your details.
Re: opening a .ui file created in Designer in Visual Studio
Thanks, shall do as suggested.