Results 1 to 2 of 2

Thread: Project structure with Qt designer

  1. #1
    Join Date
    Jun 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Project structure with Qt designer

    I am new to QT programming..

    I am quite confused by the classes generated with Qt Designer, I don't know WHERE to put my code, if I want to encapsulate my own logic in other classes.

    My project's name is mt, so the Designer generated classes below:

    Ui_mtClass
    mtClass
    mt

    the Ui_mtClass cannot be changed manually, while mtClass only has a declaration(no defination). Does that mean I have to define the mtClass in a new cpp file, and add my code there ??

    Additionally, the Designer only add the connections to Ui_mtClass, but no slots defination code added, it is so strange.. And the mtClass has no corresponding cpp or .h file generated, just a declaration...

    Is there any UML or some thing brifely show the architecture of a QT project??

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Project structure with Qt designer

    Quote Originally Posted by lmax View Post
    the Ui_mtClass cannot be changed manually, while mtClass only has a declaration(no defination). Does that mean I have to define the mtClass in a new cpp file, and add my code there ??
    No, you are supposed to create a new class that inherits QWidget or something else and use the Ui::mtClass in it.

    Read this: http://doc.trolltech.com/4.4/designe...component.html

    Personally I prefer the single inheritance approach.

Similar Threads

  1. help needed with complicated project
    By Muzz in forum Newbie
    Replies: 12
    Last Post: 15th February 2008, 09:54
  2. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  3. Qt4 open src mingw from a PC to another
    By nvictor in forum Installation and Deployment
    Replies: 11
    Last Post: 1st May 2007, 17:41
  4. Creating project in designer
    By safknw in forum Qt Tools
    Replies: 3
    Last Post: 10th May 2006, 14:11
  5. Example OpenGL project?
    By brcain in forum Qt Tools
    Replies: 9
    Last Post: 23rd February 2006, 21:17

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.