View Single Post
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#11
Originally Posted by ahmadka View Post
Forgive me, I'm such a n00b at this right now .. I tried using QDialog as well, but I couldn't figure out what method does it have to add buttons and stuff to it .. With QDialogButtonBox, there's an addButton method which can be used to add buttons to QDialogButtonBox ... How do I add controls to a QDialog ... ?
You generally don't directly. You'll want to create a layout (or a set of nested layouts) to... erm... layout... the design of your dialogue. You then use addWidget (and addLayout) to build them up. Finally you can use setLayout to add the top-level layout to your dialog.

I'd suggest reading the documentation on this - http://doc.qt.nokia.com/qt-maemo-4.6...d-layouts.html and http://doc.qt.nokia.com/qt-maemo-4.6/layout.html should cover how widgets and layouts interact (a QDialog is really just another widget).
 

The Following User Says Thank You to Rob1n For This Useful Post: