Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Learning
  3. Qt in Education
  4. Need help... confused a bit with Qt Creator
QtWS25 Last Chance

Need help... confused a bit with Qt Creator

Scheduled Pinned Locked Moved Qt in Education
2 Posts 2 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Power_user_EX
    wrote on 4 Feb 2012, 15:32 last edited by
    #1

    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 :
      @class MainWindow : public QMainWindow
      {
      Q_OBJECT

    public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    private:
    Ui::MainWindow *ui;
    };@

    especially Q_OBJECT and @explicit MainWindow (QWidget *parent = 0);@

    1. And this code :
      @
      MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
      {
      ui->setupUi(this);
      }

    MainWindow::~MainWindow()
    {
    delete ui;
    }
    @

    1. If I want to program the same using Qt Quick what will the difference in code style ?

    -Regards ,
    Umang G (Power_user_EX)

    Website @ http://www.ocfreaks.com

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on 4 Feb 2012, 16:27 last edited by
      #2

      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 ":http://developer.qt.nokia.com/doc/qt-4.8/moc.html

      The "explicit statement is explained here":http://www.glenmccl.com/tip_023.htm 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.":http://www.cplusplus.com/doc/tutorial/ Please consult google search for others.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0

      1/2

      4 Feb 2012, 15:32

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved