Get list of widgets for QGuiApplication----stackoverflow

来源:互联网 发布:波利亚计数定理 知乎 编辑:程序博客网 时间:2024/05/16 17:31

原文地址::https://stackoverflow.com/questions/24672390/get-list-of-widgets-for-qguiapplication




1down votefavorite

I need to get list of UI elements on the application main window (all windows, doesn't matter). The problem is that there is no topLevelWidgets() function in QGuiApplication, it is in QApplication. Of course I could use QApplication instead of QGuiApplication, but the application already exists and I can't change source codes. I'm writing plugin.

I think if Qt allows you to write place UI elements for application using QGuiApplication class, it should give some way to get those elements, but maybe I'm wrong.

Any ideas?





1down votefavorite

I need to get list of UI elements on the application main window (all windows, doesn't matter). The problem is that there is no topLevelWidgets() function in QGuiApplication, it is in QApplication. Of course I could use QApplication instead of QGuiApplication, but the application already exists and I can't change source codes. I'm writing plugin.

I think if Qt allows you to write place UI elements for application using QGuiApplication class, it should give some way to get those elements, but maybe I'm wrong.

Any ideas?

阅读全文
0 0
原创粉丝点击