Results 1 to 5 of 5

Thread: Issues with Uic.

  1. #1
    Join Date
    Dec 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Issues with Uic.

    I just installed Qt 4.7.1 and hooked it up to Visual Studio 2010. I designed a widget in Qt Designer, then compiled it with Uic. However, the interface file this generates seems to be creating a small problem when I use the QDialogButtonBox widget to create two standard dialog buttons, Ok and Cancel.

    Specifically, whenever I try to refer to one of the methods for one of the buttons in a QDialogButtonBox, it complains that said button isn't defined, e.g.:

    buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false)

    doesn't work. And, if I try to compile it, I get a QPushButton undefined error due to the above line of code. I was able to resolve this problem by hand-editing the interface file by adding the following line of code:

    #include <QtGui/QPushDown>

    But this isn't ideal, as I have to do a song and dance to disable autocompiling the ui file with Uic, resolve where the problem is, and hand-edit the autogenerated code.

    So, I guess my question is, is this setup -- Qt + Visual Studio 2010 -- relatively painless to develop in for newbies, or can I expect continued problems? The reason I ask is because I'm investigating whether to use this to teach an introductory programming lab at a college (for which I'm a masters student) and I don't want the students (many of which will be new to programming) to have to tinker around with that sort of thing. GUI programming is not the focus, so it can't get in the way.


    Added after 13 minutes:


    Ooops, I should have posted this in the Newbie section. Sorry.
    Last edited by queelius; 1st December 2010 at 01:00.

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Issues with Uic.

    Include the QPushButton in the source file where you actually use the push button instead. Saves you the head ache.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Dec 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Issues with Uic.

    Your advice is actually the sane way to address my "issue."

    I humbly thank you.

  4. #4
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Issues with Uic.

    So, I guess my question is, is this setup -- Qt + Visual Studio 2010 -- relatively painless to develop in for newbies, or can I expect continued problems? The reason I ask is because I'm investigating whether to use this to teach an introductory programming lab at a college...and I don't want the students... to have to tinker around with that sort of thing.
    IMHO QtCreator is the easiest way to start using Qt for beginners. No more tinkering required whatsoever. It works both with the MingW and Visual Studio compiler.

    Best regards,
    Marc

    P.S. I bet the professional (paid for) pluging for Visual Studio is also very good, but I guess the school won't pay for all of that for an introductory class. The free plugin has limitations that makes it less easy compared to using QtCreator.

  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Issues with Uic.

    I was under the impression that the paid for plugin for Visual studio is no longer maintained. The newest version of the plugin is now the free version.

    However, when I was using the paid-for version at a company earlier this year, it didn't seem that much different apart from the fact that things like QtDesigner are built into the Visual Studio IDE rather than running QtDesigner itself as in the free version.

Similar Threads

  1. Issues with macdeployqt on OSX 10.5
    By My3rdGradeShirt in forum Qt Programming
    Replies: 0
    Last Post: 28th November 2010, 16:25
  2. 4.6.0 issues on OS X 10.6 with GL
    By treaves in forum Qt Programming
    Replies: 2
    Last Post: 2nd December 2009, 18:12
  3. CPU Loading issues
    By arunvv in forum Qt Programming
    Replies: 0
    Last Post: 21st September 2009, 20:22
  4. Issues with Qt::StatusTipRole
    By laugusti in forum Qt Programming
    Replies: 2
    Last Post: 20th August 2009, 16:43
  5. zoombase issues still
    By risa in forum Qwt
    Replies: 1
    Last Post: 11th August 2009, 21:38

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.