Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 857499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:24:29+00:00 2026-05-15T08:24:29+00:00

I am a Qt beginner and working with Qt Designer to develop some small

  • 0

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
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:24:30+00:00Added an answer on May 15, 2026 at 8:24 am

    With Qt Designer, you can add items to a combo box (double-click on the combobox to show up the editor). But if your folder list will vary, you’ll have to do it by code.

    Have a look to QCombobox documentation (Qt doc is really good).

    How are your storing your folders in the vector ? As strings ?

    Il your QVector is containing strings, you can easily convert it into a QStringList and use it to populate your combobox :

    QVector<QString> FolderList;    
    myComboBox->addItems(FolderList.toList());
    

    Then, you can connect the signal currentIndexChanged(const QString&) of your QComboBox to a slot to do something when the folder has changed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a beginner with SQL and am working on one of my first databases.
I am a complete beginner trying to develop for FCKeditor so please bear with
A beginner question, bear with me: I'm just wondering under what circumstances one should
A beginner's question. I'm building a .swf with Flex Ant. To my .swf I
What database should a beginner use in the C language? Can I use MySQL?
I'm not a beginner at C# but I really need to increase my understanding,
As a complete beginner with no programming experience, I am trying to find beautiful
Once again a very beginner-ish question, but here I go: I would like to
The very common beginner mistake is when you try to use a class property
I'm a complete beginner when it comes to programming. I'm taking a stab at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.