Need help… confused a bit with Qt Creator
Hi all .. I m new to Qt 4.7 programming using Qt Creator .. Have some questions :
1) Whats the basic difference between Qt Quick Application / UI and Qt Widget based app (Qt Gui application) in terms of programming style and convensions ? The main difference I see it Quick App uses QML for GUI design while Qt Widget based app uses UI forms to design GUI using Drag and drop .. after this is a bit confusing for me.
2) Can some 1 explain me this code :
- {
- Q_OBJECT
- public:
- ~MainWindow();
- private:
- Ui::MainWindow *ui;
- };
especially Q_OBJECT and
3) And this code :
- ui(new Ui::MainWindow)
- {
- ui->setupUi(this);
- }
- MainWindow::~MainWindow()
- {
- delete ui;
- }
4) If I want to program the same using Qt Quick what will the difference in code style ?
-Regards ,
Umang G (Power_user_EX)
1 reply
Qt creator is an IDE (Integrated Development Environment) which helps you developing your applications.
The sections, you are showing, are C++ source code presumably generated by the Qt creator based it templates.
Q_OBJECT is required for the Meta Object Compiler [developer.qt.nokia.com]
The explicit statement is explained here [glenmccl.com] for example.
All see there is basic C++ code. It is recommended to have sufficient knowledge of C++ for using it with Qt. You might want to look for a C++ tutorial first, if you are lacking this knowledge. One option for a tutorial. [cplusplus.com] Please consult google search for others.
You must log in to post a reply. Not a member yet? Register here!


