Results 1 to 6 of 6

Thread: Doubt about creating GUI

  1. #1
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Doubt about creating GUI

    Hi everybody ,

    I am working with QT4.4.0 . Now I am starting a new project which should be compile in both windows , Linux and Mac . Most of the cases I have seen that GUI was developed through code not with the designer . Now I am planing to create total GUI of my application using designer in windows Platform . Will it be any problem if I compile the same application in both Linux and Mac. I am very much confused why most of the people create GUI through code.
    So please help me to clear my confusion .

    Regards,
    Sudheer.

  2. #2
    Join Date
    Mar 2008
    Posts
    16
    Thanks
    3
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Doubt about creating GUI

    You can use both Qt Designer or writing code to develop GUI; maybe if you are a beginner you can try using Qt Designer because it is usually fast and intuitive.
    Qt is a cross-platform framework and that means when you write C++ code by using Qt it is compatible on Windows, Linux and Mac. That is ok when you don't write platfotm-dipendent code.

  3. #3
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Doubt about creating GUI

    Hi ,
    Thanks for your reply . Please make me clear about that can I create an application GUI with designer and make compile the same in windows ,Linux and Mac with out any problem.


    Regards,
    Sudheer K

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Doubt about creating GUI

    You build the UI with Designer which produces a source file with the UI extension. This file is listed in the FORMS section of your PRO file. It is ultimately compiled by a program called uic to produce a C++ source file called ui_whatever.h that is included in your user interface class implementation, e.g. mainwindow.cpp contains
    Qt Code:
    1. #include "ui_mainwindow.h"
    To copy to clipboard, switch view to plain text mode 
    which was built from mainwindow.ui.

    You don't need to worry about how this works if you let qmake handle it for you. Copy the source to the target platform, run qmake and make. It works happily across Linux, Windows and Mac.

  5. #5
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Doubt about creating GUI

    Hi ,
    Thanks for your reply , I got confused with your answer which is shown below.

    Code:
    1. It is ultimately compiled by a program called uic to produce a C++ source file called ui_whatever.h
    To copy to clipboard, switch view to plain text mode 

    After creating .ui file you asked me to list in forms section of PRO file , after that what all I have to do to get the ui_whatever.h . Actually you told told compile for that what all I have to do.
    Please help me .



    Regards,
    Sudheer.

  6. #6
    Join Date
    Oct 2010
    Posts
    37
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Doubt about creating GUI

    It's better to make GUI's using code than the designer because designers GUIs suck GUIs designed in code are nicer IMO and it's easier to do things like dynamic interfaces .etc

Similar Threads

  1. doubt
    By AnithaRagupathy in forum Qt Programming
    Replies: 1
    Last Post: 8th February 2008, 06:06
  2. doubt
    By deepa.selvaraj in forum Qt Programming
    Replies: 2
    Last Post: 12th November 2007, 09:23
  3. Doubt ?
    By Cutey in forum Qt Tools
    Replies: 2
    Last Post: 3rd March 2007, 09:45
  4. QT 4.1 in OSX I have a doubt
    By askot in forum Installation and Deployment
    Replies: 9
    Last Post: 25th February 2006, 06:14

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.