PDA

View Full Version : New to Qt Developer 4.8



wilk3sy
3rd February 2016, 17:18
Hi guys/girls

I'm working on a project at work; I've picked up the software halfway through a project to find they have been using Qt Developer 4.8

I have a few questions that will probably be obvious to so many of you.

First of all.

Developer; the .ui file that is created, is that all you get when using developer? ie you don't get an .cc or .h file?

anda_skoa
3rd February 2016, 18:51
Since there is no Qt Developer 4.8 we'll assume you mean Qt 4.8

Regarding your question:
you can create .ui files stand-alone, but usually you will also have a .h and .cpp file for the class that is using the code generated from the .ui file.

Cheers,
_

ChrisW67
3rd February 2016, 20:09
The qmake utility has the FORMS variable to list the UI files from Designer, arrange their processing through uic (UI compiler) to produce header and source matching the UI design (blah.ui --> ui_blah.h and ui_blah.cpp), and ensure they are compiled and linked into the project. The Qt Creator IDE has wizards that will produce skeleton header and source files to wrap the files generated by uic as a starting point for application code. You can, of course, write these manually.

wilk3sy
3rd February 2016, 21:12
Thanks guys.

It doesn't look like they've used qmake or UIC.

I'll double check tomorrow by running UIC on the .ui file to see if I get something similar to the .cc and .h files.

How does the cpp link to the ui? is there a simple explanation?