1. 4FipS.com
  2. Photos
  3. Videos
  4. Code
  5. Forums
  6. pfQuizzz
  7. About

4FipS.com Forums

Forums dedicated to the projects hosted at 4FipS.com

Skip to content

Qt 4.8 / Visual Studio 2010 integration

> About coding, hacking, photography, and such...

Qt 4.8 / Visual Studio 2010 integration

Postby FipS on Wed Jan 11, 2012 10:45 pm

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!
User avatar
FipS
Site Admin
 
Posts: 146
Joined: Wed Nov 12, 2008 9:49 pm
Location: Prague

Qt 4.8 / Visual Studio 2010 integration

Sponsor

Sponsor
 

Re: Qt 4.8 / Visual Studio 2010 integration

Postby FipS on Sun Jan 15, 2012 6:51 pm

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.*
}
User avatar
FipS
Site Admin
 
Posts: 146
Joined: Wed Nov 12, 2008 9:49 pm
Location: Prague

Re: Qt 4.8 / Visual Studio 2010 integration

Postby FipS on Mon Jan 16, 2012 10:45 pm

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.
User avatar
FipS
Site Admin
 
Posts: 146
Joined: Wed Nov 12, 2008 9:49 pm
Location: Prague


Return to 4FipS.com General Discussion & Blog

Who is online

Users browsing this forum: No registered users and 3 guests

cron