Qt provides QSplashScreen class in case you want to have a splash screen for your application without any efforts. You can use the approach below to add an splash screen image of your choice using QSplashScreen and QPixmap classes that stays for 1 second and then disappears.
Continue reading “How to Add a Splash Screen for Your Qt Application”How to Get Window Handle (HWND) in Qt
You can use the following approach to get a Window‘s Handle in Qt. This can be useful in case you need to call a Windows API (Win32 API) function that is not implemented in Qt or for any other purposes.
Continue reading “How to Get Window Handle (HWND) in Qt”What you need to know about LPCTSTR in Windows API (Specially for Qt users)
This question comes up a lot and is sometimes very confusing but if you just pay attention for a few seconds you’ll get past this forever, I promise you.
Continue reading “What you need to know about LPCTSTR in Windows API (Specially for Qt users)”How to Convert QString to Wide C String (wchar_t *)
The same as standard C String, for this also you can go through standard C++ as shown below:
Let’s say you have a QString, like this:
QString s = "www.amin-ahmadi.com";
First convert it to std::wstring and then use its c_str method, like this:
s.toStdWString().c_str()
How to convert QString to C String (char *)
The best solution for this would be to go through standard C++ and it means this:
Let’s say you have a QString, like this:
QString s = "www.amin-ahmadi.com";
First convert it to std::string and then use its c_str method, like this:
s.toStdString().c_str()
How to Create Custom Shaped Windows in Qt
By default every window you create has a rectangular shape but in case you want to have a window which is non-rectangular (such as ellipse or triangle or any shape you prefer) then you can use the approach below.
Continue reading “How to Create Custom Shaped Windows in Qt”How to make QScroller grabGesture work with QDialog
If you have tried this then you have definitely noticed that it becomes very annoying when you want to use QScroller::grabGesture with QDialogs that are opened using exec and have used QScroller::grabGesture in the calling (parent) window or dialog.
Continue reading “How to make QScroller grabGesture work with QDialog”
Flowers
Download the full image from here. (9 Mb)
Sofistication
Canon EOS, CyberLink PhotoDirector, Corel Painter Essentials
Click here to download the full image. (8.3 Mb)
Which programming language should I learn?
This question comes up all the time and to be honest there is no definite answer to this question. To be able to point out in a direction for anyone who is asking “Which programming language should I learn?” , “Which one is the best programming language?” or so one has to understand the types of programming languages.
Continue reading “Which programming language should I learn?”