Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望从 Qtitan 视图中响应滚动事件。从一个普通的 QT 小部件,我将连接(...)来自小部件滚动条的信号。在 Qtitan 中,底层的滚动条似乎不可见。
我的设置是 QMainWindow,它使用 QWidget 作为 CentralWidget,其中 QWidget 在其布局中包含 Qtitan::Grid。
有任何想法吗?
如果 API 中没有合适的内容,请尝试手动查找滚动条对象:
widget->findChildren<QScrollBar*>()
可以使用 来区分滚动条QScrollBar::orientation()。
QScrollBar::orientation()