如何在Qt Designer中创建自定义小部件? [英] How do you create a custom widget in Qt Designer?

查看:191
本文介绍了如何在Qt Designer中创建自定义小部件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以这让我疯狂!我知道如何通过促销方法在Qt中实现自定义小部件,但现在我想在构建我的应用程序之前能够在设计器中查看我的自定义小部件,并且我在网上看到的每个教程都使用促销方法或者是很难解释。我看了Qt文档,我似乎无法让他们的方法工作。我来自.NET背景,所以我有点希望我可以使用类似于MS UserControls的东西。只有这看起来要复杂得多。当然不能那么难......有人可以提供更好的解释吗?谢谢!

Okay, so this is driving me CRAZY! I know how to implement custom widgets in Qt via the promotion method, but now I want to actually be able to view my custom widgets in the designer before building my application, and every tutorial I've seen online either uses the promotion method or is very poorly explained. I looked at the Qt documentation and I couldn't seem to get their methods to work. I come from a .NET background, so I was kinda hoping I could use something similar to MS UserControls. Only this seems much more complicated. Surely it can't be that hard... could someone please offer a better explanation? Thank you!

推荐答案

当我进入Qt时,我也来自.Net背景。

也许这个 [ ^ ]链接可以帮到你,到目前为止我还没有尝试过。
I was coming from a .Net background when I got into Qt, too.
Maybe this[^] link helps you, I haven't tried it out so far.


这篇关于如何在Qt Designer中创建自定义小部件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆