Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Qt use of QCombobox

I am using the Qt libraries.  I have an option on one of my menus "DiscStim" that open up a DiscStim window that has a "Destination" QCombobox in it.  I have some irrelevant selections: call them dest1, dest2, and dest3 that are available when you click on the Destinations QCombobox.  Initially there is no text in the QCombobox.  Unfortunately if you choose something - says dest1, if you then close the DiscStim window, and then choose DiscStim from the menu again, the previous selection is still there.  My questions are:

1) how do I make Destinations QCombobox blank every time I open the DiscStim window?  Blank is not one of the QCombobox options.  It's only there until you open the QCombobox and select something else.

2) When it is blank, it is blue.  How do I do that?

1 Solution
1. Do this

QComboBox* c;


2. Not possible

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now