| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
Hi, I cannot generate cpp and moc files from the ui file. When I write the commands on command line uic -o myform.h myform.ui uic -o myform.cpp -impl myform.h myform.ui I have the .h file but I do not have any cpp file. After generating these files I am going to use them in Visual Studio 6 for some opengl project. Can anybody help me with this? Burcu _________________________________________________________________ Mortgage refinance is hot 1) Rates near 30-yr lows 2) Good credit get intro-rate 4.625%* https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h2a5f&s=4056&p=5117&disc=y&vers=743 -- [ signature omitted ]
On Sunday 01 April 2007 23:06, Burcu Arsoy wrote: > Hi, > I cannot generate cpp and moc files from the ui file. When I write the > commands on command line > > uic -o myform.h myform.ui > uic -o myform.cpp -impl myform.h myform.ui > > I have the .h file but I do not have any cpp file. > After generating these files I am going to use them in Visual Studio 6 for > some opengl project. > > Can anybody help me with this? > > Burcu > If you are using Qt 4.x (What i'm suspecting) than this is correct. You'll have to subclass your form and implement the methods yourself. (This is a difference from Qt 3) See the Qt-Assistant for further details on how to do this. > _________________________________________________________________ > Mortgage refinance is hot 1) Rates near 30-yr lows 2) Good credit get > intro-rate 4.625%* > https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&searc >h=mortgage_text_links_88_h2a5f&s=4056&p=5117&disc=y&vers=743 > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with > "unsubscribe" in the subject or the body. List archive and information: > http://lists.trolltech.com/qt-interest/ -- [ signature omitted ]
On 01.04.07 23:15:01, Peter M. Groen wrote: > On Sunday 01 April 2007 23:06, Burcu Arsoy wrote: > > Hi, > > I cannot generate cpp and moc files from the ui file. When I write the > > commands on command line > > > > uic -o myform.h myform.ui > > uic -o myform.cpp -impl myform.h myform.ui > > > > I have the .h file but I do not have any cpp file. > > After generating these files I am going to use them in Visual Studio 6 for > > some opengl project. > > > > Can anybody help me with this? > > > > Burcu > > > > If you are using Qt 4.x (What i'm suspecting) than this is correct. You'll > have to subclass your form and implement the methods yourself. (This is a > difference from Qt 3) You're actually describing the Qt3 method, for Qt4 there are 3 differen ways, one of which is subclassing a QWidget and the generated class and then implement slots and other stuff. Andreas -- [ signature omitted ]
On 01.04.07 21:57:38, Burcu Arsoy wrote: > I don't know the ways for qt4 and I'm new so I cannot understand what > you're saying. Could you please explain it more? Please keep this on the list. Well, if you're new you should read the designer manual that is part of the Qt documentation. Make sure to read the one for the version of Qt you're using (i.e. Qt3 or Qt4), because there are important differences between both versions. The manual explains how to use the code that is generated by uic. Andreas -- [ signature omitted ]
Attachment:
pgpWMuspSVrs4.pgp
Description: PGP signature
Andreas Pakulat schrieb: > On 01.04.07 21:57:38, Burcu Arsoy wrote: >> I don't know the ways for qt4 and I'm new so I cannot understand what >> ... > Well, if you're new you should read the designer manual that is part of Furthermore also for Visual Studio 6 there's the "Qt Add-In" plugin (the "Qt integration" plugin only works for Qt 4 and I'm not even sure if Visual Studio 6 is supported). This "Add-In plugin" can automate the necessary "custom build steps" for *.ui files and as another advantage they are carried out automatically once you change the *.ui file. The way you want to do it as it seems it to generate the *.h/*.cpp files once - which off course work, but only as long as you don't change the *.ui file in which case you would have to update the *.h/*.cpp files again /manually/. The Qt Add-In and Integration tools are available for commercial Qt licenses (only?). Another solution would be to only use *.pro files, add your *.ui files to the FORMS = ... line (or was it INTERFACES = .. with Qt3? Check qmake documentation) and then have the Visual Studio 6 project file generated automatically (something like "qmake -t vcapp" - again, this might only work with the commercial license of Qt3, not sure if the non-commercial Qt 3 offers Visual Studio support). Check the Trolltech website. Cheers, Oliver -- [ signature omitted ]