November 10, 2010

tachoknight tachoknight
Lab Rat
1 posts

Different output in VS2010 than ... everything else

 

Hi all-

I’m a complete newbie to QT, having downloaded the SDK on Monday. Working with both QT Creator and the Eclipse plugin, I have created some test applications and I’m just blown away by how cool QT is; once I figured out how to do the signal->slot connections in the designer, I was happily coding away. Awesome stuff!

I apologize if this is an “everybody knows but me” question, but I was wondering why the UI member in a project generated using the VS Plugin is not a pointer, when an identical project created under QT Creator, and the QT Plugin for Eclipse, it is. Not a huge deal, of course, but moving code back and forth from the various projects requires changing the dereference operator. I know I could just change it, but I figured there might be a reason why it was done this way.

Just curious, I already love QT…I’m never going back to MFC. :)

2 replies

November 10, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1481 posts

I’ve not used VS Plugin and can’t answer you on that but

tachoknight wrote:
I’m never going back to MFC. :)

cheers! I know exactly what you mean and welcome to Qt! I’m a convert too and it was bye bye Java for me :)

November 10, 2010

Tobias Hunger Tobias Hunger
Robot Herder
3386 posts

There are several ways to do UI file integration into C++ classes (as documented [doc.qt.nokia.com]). VS Plugin and Qt Creator both implement a flavor of “the direct approach”. I doubt that there is any more specific reason than personal preferences of the developers that actually did the wizards to set them up.

Having said this and being a Creator guy myself I have to point out that QObjects should be allocated on the heap and thus you should prefer Qt Creator’s way of doing things.

Welcome aboard by the way… I fully understand why you do not want to go back to MFC by the way:-)

 
  ‹‹ [Solved]Custom QComboBox      [Solved] Cannot build an app for desktop ››

You must log in to post a reply. Not a member yet? Register here!