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
Bookmarks