user interface - How to provide Input to Dialogs designed by Qt Designer -


I am starting a QT and working with QT Designer to develop some small UI elements. I used to use these GUI elements in my code and read many legacy approaches to read.

I'm starting a bookmark feature that looks to some extent. The problem I am facing now is, how can I show all existing bookmark folders in the drop down (folders are in QVector) then my main problem is how can I do some input in the UI element.

I think I am clear, please tell me whether further clarification is required or not. Sorry for adding links, rich formatting is not working in my browser.

Edit: As there are some suggestions, I have to go through the code, but in that case it is possible to create all other components such as text edit, add cambodia using labels, buttons and codes. Because I have already developed code and folder feature for bookmarks in existing things.

Thanks for the suggestions Finally I came up with the solution I was using multiple succession of UI files generated by QT Designer. So look like a solution:

 Dialog.ui UI file will be generated by QtDesigner http: //bookmarDialog.h #include "ui_Dialog.h" class bookmarking Dialog: public QWidget, Private Ui :: Dialog {Q_OBJECT Public: BookmarkDialog (QWidget * Basic = 0); } //bookmarkDialog.cpp #include "bookmarkDialog.h" BookmarkDialog :: BookmarkDialog (): QWidget (parent) {setupUi (this); QList folder = getAllFolders (); ComboBox-> insertItems (0, folders); // comboBox is defined in the UI file} 

with QT designer You can add items to a combo box (double click on the combobox to show the editor). But if your folder list is different, then you have to do it with code.

Check the document (QT Doctor is really good).

Folders in vector? As the strings?

Ill is your QVector string, you can easily convert it to a QStringList and use it to populate your cumboxes. Are:

QVector & lt; QString & gt; FolderList; MyComboBox-> AddItems (FolderList.toList ());

Then, when you connect to the signal current index change (consteation and end) your QComboBox to do something to the folder Can be changed.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -