Results 1 to 3 of 3

Thread: Getting started with Qt Creator 4.6...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Getting started with Qt Creator 4.6...

    Hi all! I am a total noob with Qt, although I am a seasoned developer in many other environments. (Mostly Java I am afraid )

    But I have decided to try to learn Qt since I have some spare time...

    I have looked for, but failed to find, a walk-through of how to create some kind of "Hello World" application using Qt Creator + Qt Designer. There are various tutorials on the two tools separate, but they don't tell the full story of how to make them work together.

    So I have downloaded and installed the 4.6.0 SDK, and created a first "Qt GUI Application" using the New Project wizard.

    I am able to modify the UI and build and run the app without problems. Next step would be to have the UI actually perform some action.

    So I created a "Help > About..." menu item and added a "triggered" action to it, which gave me an on_actionAbout_triggered() slot in my MainWindow class, and the corresponding method stub in the mainwindow.cpp. Fine.

    Then I create a new Form of class QDialog which is to be the about box. Also simple. Fine.

    If I run a new build I now get a new ui header file for the new About box. Great.

    Except I can't seem to understand how I make the on_actionAbout_triggered()-method in the MainWindow class display the About box. I thought I should create a new instance of the QDialog that should have the MainWindow as parent, and then call .show() on this, or something similar.

    But how, exactly?

    It seems in the FormEditor window I have an object called AboutBox of class QDialog, but I can't seem to find any corresponding code that has been generated. The generated .h file has a class called UI::AboutBox but it is not a QDialog...

    Unfortunately the "Writing a Simple Program with Qt Creator" part in the QtCreator manual only has one form, so it doesn't help me here.

    /j
    Last edited by JesperWe; 15th December 2009 at 13:01.

Similar Threads

  1. Replies: 8
    Last Post: 27th March 2013, 11:51
  2. Made changes to qmake. I want to share them, but I couldn't get started.
    By paulocarvalho_br_2009 in forum General Discussion
    Replies: 1
    Last Post: 25th May 2009, 15:41
  3. Replies: 5
    Last Post: 19th September 2008, 15:24
  4. Getting Started
    By Hockey in forum Newbie
    Replies: 9
    Last Post: 29th November 2007, 21:43
  5. Replies: 2
    Last Post: 30th March 2007, 08:10

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.