[Qt-interest] New to QT - Beginners questions
Matthias Pospiech
matthias.pospiech at gmx.de
Wed Sep 1 15:31:30 CEST 2010
Jens Saathoff schrieb:
>
>
> For wxWidgets-GUI i don't use any GUI-Designer. Would you recommend
> using QtCreator or switch back to "design it without a GUI-Designer"?
I would start with the gui designer and study the generated code. Apart
from that you could have a look at the Qt books:
http://qt.nokia.com/developer/books/cpp-gui-programming-with-qt-4-2nd-edition
or http://cartan.cas.suffolk.edu/oopdocbook/opensource/
for example code.
I personaly only use self generated code if the gui depends on something
- for example the number of available devices, or
if I create simple widgets I want to reuse very often.
Anyway I would create the ui the way QtCreator does it:
---- header: ----
namespace Ui
{
class DialogABC;
}
class DialogABC : public QDialog
{
Q_OBJECT
public:
...
private:
Ui::DialogABC * ui;
};
---- cpp: ----
#include "DialogABC.h"
#include "ui_DialogABC.h"
DialogABC::DialogABC(QWidget* parent /*= 0*/, Qt::WFlags flags /*= 0*/)
: QDialog(parent, flags)
, ui(new Ui::DialogABC)
{
ui->setupUi(this);
...
}
Matthias
More information about the Qt-interest-old
mailing list