[英]Can I use the search box control seen in Windows Explorer in my own application?
Can I use this search box control seen in Windows Explorer in my own Qt/C++ application? 我可以在自己的Qt / C ++应用程序中使用Windows资源管理器中的搜索框控件吗? Or is it a custom control I'd have to implement manually?
或者它是我必须手动实现的自定义控件?
You can use the Windows Search Service to access the search functionality; 您可以使用Windows搜索服务来访问搜索功能; I'm not sure you can embed the actual control that Explorer uses in your own app, but you could certainly create your own that works the same way.
我不确定你可以嵌入资源管理器在你自己的应用程序中使用的实际控件,但你当然可以创建自己的工作方式相同。
I haven't seen this kind of control, however in Qt it's easy to implement it manually. 我还没有看到这种控制,但是在Qt中很容易手动实现它。 You may follow this tutorial: http://labs.qt.nokia.com/2007/06/06/lineedit-with-a-clear-button/ and just replace a clear icon with a search one (and change slot from
clear()
to something which performs desired search, of course). 您可以按照本教程: http : //labs.qt.nokia.com/2007/06/06/lineedit-with-a-clear-button/ ,只需用搜索一个替换一个清晰的图标(并从
clear()
更换插槽) clear()
当然执行所需搜索的东西)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.