If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Welcome to Qt Centre.

Qt Centre is a community site devoted to programming in C++ using the Qt framework. Over 90 percent of questions asked here gets answered. If you are looking for information about Qt related issue — register and post your question.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

Re: qt with glut on windows 10

The program has unexpectedly finished

So what does the debugger's call stack output tell you about where the error has occurred and what might have caused it? Have you set a debugger breakpoint at the very first line in your program and stepped through it to see where the error occurs?

If you are going to post code or error listings, post the code and not a screenshot of the code.

<=== 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.

Re: qt with glut on windows 10

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.

Re: qt with glut on windows 10

Ok i am trying that debuggin technique and I get "call to constructor of 'GLWidget is ambigous call to overloaded function could be GL::GLWidget(QWidget*)' or GL::GLWidget(void) while trying to match argument list '0' i also include the glwidgets designer view

Re: qt with glut on windows 10

Originally Posted by gtx

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?

Originally Posted by gtx

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.

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.