Page 1 of 1

Qt 4.8 / Visual Studio 2010 integration

PostPosted: Wed Jan 11, 2012 10:45 pm
by fips
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:


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!

Re: Qt 4.8 / Visual Studio 2010 integration

PostPosted: Sun Jan 15, 2012 6:51 pm
by fips
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


    MyWidget(QWidget *parent = nullptr);



    Ui::MyWidget ui; // Qt Designer generated glue-class

Code: Select all
MyWidget::MyWidget(QWidget *parent):
    // individual UI controls are now available through ui.*

Re: Qt 4.8 / Visual Studio 2010 integration

PostPosted: Mon Jan 16, 2012 10:45 pm
by fips
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.