qt没有任务栏按钮 [英] No taskbar button with qt

查看:170
本文介绍了qt没有任务栏按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于Qt4,ITK和OpenSceneGraph的小项目。它的主要功能如下所示。

I had a small project based on Qt4, ITK and OpenSceneGraph. It''s main function is shown below.

展开 | 选择 | Wrap | 行号

推荐答案

C ++ new 运算符返回MainWindow对象的地址,而不是对象本身。


你需要像trhat这样的代码使用MainWindow指针:
The C++ new operator returns rthe address of the MainWindow object and not the object itself.

You need code like trhat works with a MainWindow pointer:
展开 | 选择 | Wrap | 行号


但重点是的,一切正常(主窗口显示,你可以alt-tab等),只有没有任务栏按钮。


你是对的,我可以尝试我上班了我没注意到它,因为编译器没有发出关于它的警告/错误!
But the point is, everything worked (main window would show, you could alt-tab to it, etc), there was only no taskbar button.

And you are right, I can try that when I get to work. I did not notice it because compiler did not issue a warning/error about it!


你需要查看MainWindow的代码。您正在调用默认构造函数。那里应该有代码来创建你的任务栏。

You will need to look at the code for MainWindow. You are calling the default constructor. There should be code there to create your task bar.

展开 | 选择 | Wrap | 行号


这篇关于qt没有任务栏按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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