Results 1 to 2 of 2

Thread: QT on VS2008 workflow

  1. #1
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QT on VS2008 workflow

    Hi all,

    Well, my question is: What's the best way to take profit of the QT designer instaled as a Visual Studio Add-in?
    I'm trying to do the same example that I did in this post but using QT Designer. The expample is very easy. A button and a LCD Number that increases on every click in the button. No more, no least.

    In a fresh new project of QT, using QT designer, I put the button and a QLCDNumber. Here I found my first problem. I need a slot that increases the inner counter when button is clicked. Then I have three different ways to solve the problem.

    1st: Close the designer and code all by hand.
    2nd: Create a Subclass of QLCDNumber in a separate file. Then, into designer, promote the lcdCounter from QLCDNumber to LCDCounter, adding the recent created file (lcdCounter.h). That aproach has a problem: the increase() slot doesn't appear in the signal editor, so I need to modify the code in the autocreated class.
    3th: Create the entire widget without QLCDNumber in designer, then subclass the whole widget and adding the customized stuff.

    So, in your opinion, what is the correct way to use the designer with Visual Studio?

  2. #2
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT on VS2008 workflow

    I reply myself:
    After some time investigating, I've read that there are two ways to use custom widget in the designer.

    1st one is to subclass a Widget, then put in the editor the base widget and promote the widget to our custom widget. The drawback is that designer is unable to work with the custom properties as new signal and slots.
    2nd one is to start a custom widget lib in the new project dialog in Visual Studio, code your widget, build in release mode and the copy the results (lib, dll) to plugins/designer folder. The designer then is able to work with all the prcustom properties of your widget. Also the new widget is available for future projects.

Similar Threads

  1. How to compile the Qt 4.6 release in VS2008?
    By tszzp in forum Qt Programming
    Replies: 5
    Last Post: 28th December 2009, 10:17
  2. QtAnimationFramework and VS2008
    By estel in forum Newbie
    Replies: 1
    Last Post: 19th October 2009, 08:20
  3. Qt project with .net parts(vs2008)
    By deemeetar in forum Newbie
    Replies: 0
    Last Post: 29th September 2009, 12:30
  4. Workflow Designer
    By arjoshi in forum Qt Programming
    Replies: 2
    Last Post: 1st December 2008, 04:32
  5. 4.4tp with vs2008 compile problem
    By Teerayoot in forum Installation and Deployment
    Replies: 1
    Last Post: 11th January 2008, 06:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.