Results 1 to 6 of 6

Thread: mainform.ui

  1. #1
    Join Date
    Jan 2006
    Posts
    46
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default mainform.ui

    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...



    Mariane

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: mainform.ui

    You should open the .ui file in Designer and make your changes there.

  3. #3
    Join Date
    Jan 2006
    Posts
    46
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: mainform.ui

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: mainform.ui

    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.

  5. #5
    Join Date
    Jan 2006
    Posts
    46
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: mainform.ui

    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

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: mainform.ui

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.