PDA

View Full Version : mainform.ui



Mariane
28th January 2006, 22:18
I did the tutorial 2 of the designer, than tried to modify the resulting
code to do what I want.

I'm not sure which files I should try to modify, though... On some of
them it says "all changes made here will be lost" which doesn't sound
very promising.

So I tried to modify the configuration file mainform.ui .

<widget class="QMainWindow">
<property name="name">
<cstring>MainForm</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>400</height>
</rect>
</property>
<property name="caption">
<string>Maze</string>
</property>

I added (copied from a configuration file which didn't compile but which
corresponding form previewed nicely):
<property name="icon">
<pixmap>seagull.png</pixmap>
</property>

I ran qmake and make again, but the icon didn't appear...

:confused: :confused: :confused:

Mariane

wysota
28th January 2006, 22:24
You should open the .ui file in Designer and make your changes there.

Mariane
28th January 2006, 23:08
My problem is that I have a nice interface saved in one directory, which
doesn't compile, and an example saved in another directory, which
compiles but doesn't look like I want it to look.

So I was trying to copy paste modifications from the nice interface to the
one which compiles, little by little, to track down the cause of the compiler
error (request for member `show' in `w', which is of non-aggregate type
`MainForm*').

But I'll try tomorrow to make changes in the designer, OK (it's ten past
eleven PM in France and I've been fighting the thing since midday)...

Thank you

Mariane

wysota
29th January 2006, 00:04
But the error you mention has nothing to do with the user interface... it is strictly a C++ problem. I suspect (as already mentioned in the other thread) you are missing an include or have incorrect class name.

Mariane
29th January 2006, 17:41
OK, so I think you mean I can't just make changes in the XML file...
I changed the size :
<width>500</width>
<height>400</height>
But I was only able to do that because it refered to integers, is that it?

Mariane

wysota
29th January 2006, 18:05
You can do those changes, but you have Designer to do them for you. It's like you were writing binary code instead of using a compiler.