Results 1 to 13 of 13

Thread: This makes no sense...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: This makes no sense...

    Ehm, what bug? The only bugs I can see are in your code... E.g. mainlogin.h line 10 misses a } for closing the namespace.

  2. #2
    Join Date
    Sep 2011
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: This makes no sense...

    Quote Originally Posted by Lykurg View Post
    Ehm, what bug? The only bugs I can see are in your code... E.g. mainlogin.h line 10 misses a } for closing the namespace.
    I see that now... The odd thing is that Qt Actually generated most of the code... So that's worrying.. Anyways, I fixed it. And now for my debugging problem...
    Debugging starts
    QWidget: Must construct a QApplication before a QPaintDevice
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    Debugging has finished
    Qt Code:
    1. #include <QApplication>
    2.  
    3. #include "mainwin.h"
    4.  
    5. int main(int argc, char **argv)
    6. {
    7. QApplication app(argc, argv);
    8. mainwin w;
    9. w.show();
    10. return app.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 

    What do you guys think? Fail on my part or fail on the compilers fault?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: This makes no sense...

    Qt generates correct code. It's only when you try to "improve" that mistakes start to occur. Especially the code that has this nice warning about not modifying a file because it is autogenerated.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Sep 2011
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: This makes no sense...

    No really........... I'm not trying to improve that code, I just get Qt to generate some of the code, then I do the rest. I never touch anything else.

  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: This makes no sense...

    You still modified a file which is auto generated and not meant to be modified. I very much doubt UIC would have autogenerated the "login" method. It doesn't even belong in this class.

    So you probably accidentally altered the file in such a way which caused the errors.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: This makes no sense...

    Quote Originally Posted by sapslaj View Post
    No really........... I'm not trying to improve that code, I just get Qt to generate some of the code, then I do the rest. I never touch anything else.
    In C++ you usually "improve" code by subclassing.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Sep 2011
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: This makes no sense...

    Nevermind... Just wondering about my debugging problem. I never hit this problem before.

Similar Threads

  1. what would make more sense?
    By jajdoo in forum Newbie
    Replies: 1
    Last Post: 27th July 2011, 22:54
  2. Replies: 5
    Last Post: 24th May 2011, 11:36
  3. Replies: 7
    Last Post: 13th November 2010, 07:58
  4. designer intelli-sense
    By mhoover in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2010, 13:25
  5. qsqldatabase does not sense db disconnect
    By rburge in forum Qt Programming
    Replies: 0
    Last Post: 9th March 2006, 18:59

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
  •  
Qt is a trademark of The Qt Company.