Hello,
I am a Qt beginner and working with Qt Designer to develop some small UI elements. I read http://doc.trolltech.com/4.5/designer-using-a-ui-file.html to use these GUI elements in my code and using multiple inheritance approach.
I am introducing bookmark feature which somewhat look like http://img293.imageshack.us/img293/3041/screenshotyb.png. Now the problem I am facing is How can I show all existing bookmark folders in the drop down(say folders are in a QVector). So my main problem is how can I pass some inputs to the UI element.
I think I'm clear, please let me know if further explanation is required. Sorry for adding links directly, rich formatting in my browser is not working.
EDIT : As some suggested, I have to go via code, but in that case is it possible that create all other components like textEdit, labels, buttons and add combobox using code. Because I have already developed code for bookmarks and adding folder feature in already existing thing.
Thanks For suggestions. Finally I came up with the solution. I was using multiple inheritance implementation of UI file generated by QT Designer. So solution look like :
Dialog.ui will be UI file generated by QtDesigner //bookmarDialog.h #include "ui_Dialog.h" class BookmarkDialog : public QWidget, private Ui::Dialog { Q_OBJECT public: BookmarkDialog (QWidget *parent = 0); } //bookmarkDialog.cpp #include "bookmarkDialog.h" BookmarkDialog::BookmarkDialog() : QWidget(parent) { setupUi(this); QList folders = getAllFolders(); comboBox->insertItems(0,folders);//comboBox is defined in UI file }