Results 1 to 15 of 15

Thread: qt with glut on windows 10

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2019
    Posts
    8

    Default Re: qt with glut on windows 10

    it did have that in glwidget.h with the word explicit at the beginning but no Q_OBJECT, i tried adding Q_OBJECT but then i get build time errors so i removed it again

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: qt with glut on windows 10

    Quote Originally Posted by gtx View Post
    Yea i've heard of this however the only youtube video tutorial i've found the seemed complete and i could understand was using qglwidget. I don't think qglwidget is the problem because it was working before i added the glut.
    I also don't think it is the cause of the problem but why use obsolete technology when the replacement is virtually identical in API?

    Quote Originally Posted by gtx View Post
    it did have that in glwidget.h with the word explicit at the beginning but no Q_OBJECT, i tried adding Q_OBJECT but then i get build time errors so i removed it again
    It should't matter unless you define your own slots, signals or properties.

    However, if you get build errors when adding the Q_OBJECT marker the usual fix is to re-run qmake.

    Cheers,
    _

  3. #3
    Join Date
    Aug 2019
    Posts
    8

    Default Re: qt with glut on windows 10

    ok ive reran qmake and the q_object build errors went away but the program is still crashing after a few secs in runtime urgh.

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,330
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: qt with glut on windows 10

    the program is still crashing after a few secs in runtime
    Then you really need to learn how to use the debugger and run your program in debug mode. When the program crashes, you look at the call stack and that will tell you the complete sequence of calls made by your program from the beginning up to the point where the crash occurs.

    Just keep in mind that -where- the crash occurs might not be the actual cause that leads to the crash. For example, a memory error earlier in the program may not actually cause a problem until the code that tries to use the corrupted memory gets executed. You need to look at not only where the crash happens, but what the program is trying to do when it crashes.

    Once you have established where the crash happens, if you don't understand why then report back and maybe someone here can provide some help. Just don't post screen shots of the call stack, copy and paste the text instead.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Linking glut to Qt
    By Mashkur in forum Qt Tools
    Replies: 1
    Last Post: 14th October 2012, 18:18
  2. How to link glut.h?
    By connect_qt in forum Newbie
    Replies: 3
    Last Post: 15th November 2011, 22:14
  3. Qi with glut
    By hudi in forum Qt Programming
    Replies: 7
    Last Post: 14th April 2010, 11:41
  4. using GLUT along with qtcreator/mingw in windows
    By stephanepoirier in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2009, 05:26

Tags for this Thread

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.