PDA

View Full Version : Few (hopefully) simple questions



QTGuy72
10th July 2012, 16:46
Hey everyone, I just got my start on QT and I'm having a blast so far. This is definitely a fantastic library and I'm glad I came across it. With that said, I am having a few troubles that I haven't been able to find an answer for through searching. I have a few more questions than below but I will try to keep this brief and continue searching for my other questions. This is quite a large library and it's a lot to take in so I'm sure I'll get answers to most of my questions after enough searching through the documentation. ;)

1.) The QT IDE is great for the most part but I just can't deal with the lack of functionality in comparison to Visual Studio, not to mention how used to MSVC2010 I have become over the years. Are there any other ways to generate a moc file than to use the QT IDE?
2.) Having quite a few troubles with the splash screen. First of all, transparent images (PNG) have a white rectangular border around them. Do I need to set any flags to make it transparent like it should be? Also, I want the splash screen to appear for a few seconds and then the main window. There is a simple way of accomplishing this using the below code. However, that seems a very sloppy way and I want the user to be able to click and close the splash screen if he chooses and the main window will still come up. I don't want to disable mouse events all together, and with the below code if the user clicks on the splash screen then he will still have to wait the remainder of the timer until the main window comes up.


QTimer::singleShot( 2500, &SplashScreen, SLOT( close( ) ) ); // Close splash screen after 2500 seconds
QTimer::singleShot( 2500, &MainWindow, SLOT( show() ) ); // Open main window after 2500 seconds

3.) I would like the splash screen to fade in, activate for a few seconds, then fade out (assuming there is no user interaction). Now is something like that possible or do I have to just deal with the image instantly appearing and then instantly disappearing?

Lesiok
10th July 2012, 17:30
1. Just install Qt Visual Studio Addin (http://releases.qt-project.org/vsaddin/qt-vs-addin-1.1.11-opensource.exe) and be happy with Qt and Visual together.