百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rxqt

> 编程语言
开源

Qt 的活性扩展 .

198 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Qt 的活性扩展 .

RxQt

The Reactive Extensions for Qt.

Example

…

APIs

from_signal

cpp
observable rxqt::from_signal(const QObject* sender, PointerToMemberFunction signal);

Convert Qt signal to an observable. T is decided as following.

Signal parameter type(s) T Note
void long Count of signal emission
A0 A0
A0, A1, ..., An (n > 1) tuple
cpp
template
observable rxqt::from_signal(const QObject* sender, PointerToMemberFunction signal);

Convert Qt signal, as N-ary function, to an observable. This can be used to convert private signals.

cpp
auto o = from_signal(q, &QFileSystemWatcher::fileChanged); // ERROR. o is observable> where last type is private member.
auto o = from_signal(q, &QFileSystemWatcher::fileChanged); // OK. o is observable

from_event

cpp
observable rxqt::from_event(QObject* object, QEvent::Type type);

Convert Qt event to an observable.

run_loop

Provide an interface between the Qt event loop and RxCpp's run loop scheduler. This enables use of timed RxCpp operators (such as delay and debounce) with RxQt.

Using run_loop requires an object of type run_loop to be live while the Qt event loop is active. This can be achieved most simply through use of a local variable defined after the Qt application object has been instantiated in main, or wherever the applicaiton object is instantiated. The example below gives an example of appropriate instantiation of the run_loop, together with a main window class of MainWindow:

cpp
int main(int argc, char* argv[])
{
   QApplication a(argc, argv);
   MainWindow w;
   rxqt::run_loop rxqt_run_loop;
   w.show();
   return a.exec();
}

Contribution

Issues or Pull Requests are welcomed :)

Requirement

  • RxCpp (minimum of v4.0 for use of rxqt::run_loop)

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++header-onlyqtrxrxcpp

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言