I had a small project based on Qt4, ITK and OpenSceneGraph. It's main function is shown below.
There was a problem, however. The window had no taskbar button. I spent quite some time figuring it out, and in the end it all came down to a very stupid difference: main form was instantiated with new operator.
The code that produces a normal window with taskbar:
I am not sure weather this trick would work in other circumstances/platforms (I am using Windows XP/VisualStudio200 8).
I hope this will help someone with same/similar problem.
Keywords (to increase visibility in search engines):
Qt, osg, hide taskbar button, display taskbar button, opengl, main window
Code:
int main( int argc, char **argv ) { QApplication app(argc, argv); MainWindow mainForm = new MainWindow(); mainForm.show(); return app.exec(); }
The code that produces a normal window with taskbar:
Code:
int main( int argc, char **argv ) { QApplication app(argc, argv); MainWindow mainForm; mainForm.show(); return app.exec(); }
I hope this will help someone with same/similar problem.
Keywords (to increase visibility in search engines):
Qt, osg, hide taskbar button, display taskbar button, opengl, main window
Comment