开发者

Qt:creating a dynamic button

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 lin开发者_如何学Goear search and binary search.can anyone give me an idea how to do that?


You want a QComboBox:

The QComboBox widget is a combined button and popup list.


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

Qt:creating a dynamic button

hope this helps, regards

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜