I am pretty impressed how simple it is to integrate Qt with Visual Studio 2010. After installing Qt SDK and Visual Studio Add-in the only necessary manual step is to setup Qt Version by going to a newly created VS menu:
Qt / Qt Options / Qt Versions / Add
and pointing the version to:
c:\<QtSDK>\Desktop\Qt\4.8.0\msvc2010\
After that everything works seamlessly. Just create a sample project using the Qt Wizard and hit Build. It just works, that's a miracle! The integrations feel very native and mature. Good job Nokia!
Qt 4.8 / Visual Studio 2010 integration
Re: Qt 4.8 / Visual Studio 2010 integration
I also like how is the UI glue code, generated by Qt Designer, hidden in its own class in the Ui namespace, so it doesn't interfere with my hand written code that drives the UI logic. Thanks to that my code stays clean and untouched by the generator and is very easy to refactor. Hurray!
Code: Select all
#include "ui_MyWidget.h"
class MyWidget: public QWidget // hand written class
{
Q_OBJECT
public:
MyWidget(QWidget *parent = nullptr);
private:
Q_DISABLE_COPY(MyWidget)
Ui::MyWidget ui; // Qt Designer generated glue-class
};
Code: Select all
MyWidget::MyWidget(QWidget *parent):
QWidget(parent)
{
ui.setupUi(this);
// individual UI controls are now available through ui.*
}
Re: Qt 4.8 / Visual Studio 2010 integration
I've had my first negative experience with Qt (4.8) today. QFileSystemModel seems to be seriously broken. It takes 2 seconds to just load my home directory (on a Windows machine), and when connected to a QTreeView (through a QSortFilterProxyModel), it slows UI response down considerably (e.g. when scrolling through a long list of files). A QFileSystemModel replacement would be needed for a real project... Also, the general UI layouting (e.g. when resizing the main window) seems to be somehow sluggish, but I must investigate this matter first, before drawing any conclusion.