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

  • SEARCH
  • Home
  • 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 9005073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:03:14+00:00 2026-06-16T01:03:14+00:00

I have a Combobox which has 3 items i.e. Item 1, Item 2 and

  • 0

I have a Combobox which has 3 items i.e. Item 1, Item 2 and item 3. I added these 3 items in .ui file and also added an image each for all using a resource file. Now when I am running the application, it shows the first item in combobox along with a image towards left. When i click on dropdown, I can see all the items along with images.

What I basically want to do is just display the image in the combobox and when user clicks on dropdown, it should show the image and text too.

Scenario: Items and images inside Combobox are added as follows:

Image 1 Item 1
Image 2 Item 2
Image 3 Item 3

When I run the app, it should display in combobox as

Image1

since first item gets displayed by default. I think it can be done when painting the current selection, QCombobox uses a re-implantation : void MyCombo::paintEvent(QPaintEvent *e) which is something I am not aware of.

Can anyone help me in this?? 🙂

How can I achieve it???

  • 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-06-16T01:03:15+00:00Added an answer on June 16, 2026 at 1:03 am

    You hould inherit a QComboBox and reimplement void QComboBox::showPopup () [virtual]
    P.S. If you reimplement this function to show a custom pop-up, make sure you call hidePopup() to reset the internal state.
    Second idea I have is to implement a model for combobox but i don’t now exatly is there any roule for popup elements.

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

Sidebar

Related Questions

I have a combobox from which i need to programmatically disable items depending on
I have 3 tables: Item - which is the DataContext - it has a
I have a ComboBox with several items. I have added an event handler to
I am working with C# 4.0 WinForms. I have a DataGridView which has all
In a ComboBox there are some items which have to be enabled and some
I have an Excel2010 VBA userform that has one comboBox, from which the user
The problem is strange, I have a combobox which is correctly filled with items
I have two combobox.The first combobox has three items as:{One, Tow, Three} now I
I have a ComboBox in WPF which is databound, and has data template which
So I have two comboBoxes (comboBoxFromAccount and comboBoxToAccount). Each has the same datasource, which

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.