Qt use of QCombobox

Posted on 2006-03-21
Last Modified: 2006-11-18
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?

Question by:dwcronin
    1 Comment
    LVL 12

    Accepted Solution

    1. Do this

    QComboBox* c;


    2. Not possible

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
    Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
    The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now