[merged] qglwidget and layouts problem?
-
?? :)
-
okay so i really didn't want to post again but im very confused :(
iv got a QML written Application all done by me but i dont understand how to put opengl code into it i have my QGLWidget showing but i dont know where to put the code i know the docuementation is great but only for C++ focused coding and not QML :( so where would one go for QML i like QML but i also like the C++ way of doing it just makes things alot more funner for me using QML any ideas? :) thank you if iv miss read something or iv done something wrong please tell me so its possible that i can learn from it also please tell me how you figure this stuff out because im out of options when it comes to thinking of ways of making things work in QT
-
Please don't double post. You've already asked this question in your "original thread":http://developer.qt.nokia.com/forums/viewthread/8133/ less than two hours ago. Be patient, and someone will reply there if they have an answer for you.
-
Once I came across a code snippet where QGLWidget was embbedded in QML. I think he used somekind of QGraphicsRectangle.
I'll try to look up the code.
-
Take a look at this, but this isn't the code I found earlier.
But still might be helpful: "Click here":http://talk.maemo.org/archive/index.php/t-39913.html -
Thats how you do it with C++ :) i want to do it in QML mostly unless that the only way, if i do then ill otherwise have to rewrite all my QML into C++ / QT way of doing code which is very tedious and i would rather do that in a later update of my application for now i just want things to work and the tutorials to actually work logically :D this is really annoying :((( not at you tho dude just in general finding a decent gui toolkit that has documentation that makes sense is very hard to come by some of the books are nice but they dont explain Opengl with QT in total detail which is very very /inraging :(
-
Ok... maybe we'll discuss it here. :-)
Outside of some nifty stuff which is still forthcoming, there is no direct OpenGL access available from inside of QML. It all has to be done from the C++ side of things as far as I know. QGLWidget is, by definition, a C++ thing.
The info that xcoder posted is all about making the QGLWidget coexist with your QDeclarative (QML) display area. That's probably as close as you're going to get at the moment. I don't see where that necessarily requires you to rewrite all of your QML into C++.
-
okay :D then ill do it np :) i just need to know where to place the code and is there any tutorials that explains in good detail i tried using the Orginal QT documentation but its not very detailed with the idea of placement of code inside someone elses abstract code and problems of that nature :)
wheres the common place to put this code? :) for most people and why? and how do you figure that out and know the reasons?
please go into detail when answering :]
if you need my code just ask :)
-
Merged the 2 posts
-
thanks :) lets hope theres an answer to my question with hope }:
-
iv written what QT needs to do a basic 3d graphics render but for some reason i just keep getting errors ??? and these errors are just horrid ones that no one can figure out
heres what i put i know theres some dots missing but i really dont understand what the point of it is maybe for digits?? Or something whateva but the point is it wont work no matter how many ways i try to do it even with dots! :( maybe because im placing it within some other code?? but that shouldnt effect it at all if the syntax was correct on this piece of code below, its all very confusing and i really would apperciate it if someone could guide me in the right direction and do it in a detailed way :) so i can learn from it
@ class opengl : public QGLWidget
{
Q_OBJECTpublic: opengl(QWidget *parent) : QGLWidget(parent) {} protected: void initializeGL() { glClearColor(0.0, 0.0, 0.0, 0.0); glEnable(GL_DEPTH_TEST); } void resizeGL(int w, int h) { glViewport(0, 0, (GLint)w, (GLint)h); glFrustum(); } void paintGL() glRotatef(); glMaterialfv(); glBeing(GL_QUADS); glVertex3f(); glEnd(); };
@