gtkmm 菜单栏不可见或未正确添加到网格
我最近开始使用 GTK+ 及其 C++ 绑定 (gtkmm) 开发一个 C++ 项目。我的项目最初是用 Vala 编写的,但我宁愿更直接地访问 C 和 C++ 中可用的机器。但是,我的 GTK 菜单栏遇到了一些问题。相关源代码位于以下链接(我使用了pastebin,因为我没有想要填满此页面上的太多空间)。
当我在 Vala 中以同样的方式执行小部件的附加时,效果很好。我错过了什么(我有一种感觉,这将是非常明显的)?
I've recently started development on a C++ project using GTK+ and its C++ bindings (gtkmm). My project was originally going to be written in Vala, but I would rather have the more direct access to the machine that is available in C and C++. However, I'm having some trouble with my GTK menu bar. The relevant source code is at the following link (I used a pastebin because I didn't want to fill up too much space on this page).
When I performed the appending of widgets this same way in Vala, it worked fine. What am I missing (I have a feeling it is going to be painfully obvious)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过执行以下操作解决了该问题:
I resolved the issue by doing the following: