PDA

View Full Version : using the ui file



meozeren
17th July 2009, 08:46
hi all,

i wonder when i make changes in the ui file, does the qtcreator create the corresponding code in the cpp file? because mine doesn't, and i dont see a point having a ui file then.

thanks all

mehmet

spirit
17th July 2009, 08:52
if you change an ui-files, uic-tool only generates new header files.

meozeren
17th July 2009, 08:56
what do you mean, mine doesnt even generate header files.

spirit
17th July 2009, 09:02
uic - only generates h-files for propper ui-file, it doesn't take care about cpp-file. you should modify them manually.

meozeren
17th July 2009, 09:05
ok thanks a lot, i didnt know that but, whats the point of creating buttons and editing slots and signals using the ui file then, if i'm gonna have to code it anyway? is it just for previews?

thanks in advance

spirit
17th July 2009, 09:12
no, it's not a preview -- all signals and slots will work in your app, because uic add QMetaObject::connectSlotsByName in generated ui-file. but you should be careful, you can add connection for some control by your self and that can cause then some lots will be called twice (it depens on how many connection do you have + 1 , because of this QMetaObject::connectSlotsByName calling).

jpn
17th July 2009, 09:27
what do you mean, mine doesnt even generate header files.
Is the .ui file listed in your .pro file?

meozeren
17th July 2009, 09:39
qtcreator doesnt open my .pro file. i dont know why but it just doesnt.

nish
17th July 2009, 10:00
Then you should kick his .....
anyways.. tell us how u open the file?

meozeren
17th July 2009, 10:46
using open under the file menu of qtcreator