qt没有任务栏按钮

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 | 行号