tags:

views:

39

answers:

2

hello. I want to create an application in which i will create a button and by pressing that button as list of options will open and i can choose one of them.for example i will create a button named "searching algorithm" and by clicking this button a list will open at same place which display two options as linear search and binary search.can anyone give me an idea how to do that?

A: 

I believe what you need is a popup window where you can have list of options, whenever your button is clicked show this window, hide it when user selects an item in the list or clicks outside of the working area. There is an example you can use as a reference:

QT 4.7 Google Suggest Example

alt text

hope this helps, regards

serge_gubenko
+1  A: 

You want a QComboBox:

The QComboBox widget is a combined button and popup list.

Caleb Huitt - cjhuitt