tag:blogger.com,1999:blog-6144115306124694421.post5717004547778597106..comments2023-05-11T15:35:55.769+03:00Comments on Rivo's blog: How to easily mix QWidgets and OpenGLRivo Lakshttp://www.blogger.com/profile/06873873820115729073noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-6144115306124694421.post-80850325804663781672009-11-10T22:24:03.547+02:002009-11-10T22:24:03.547+02:00nice job.
hi, is it possible to manipulate the re...nice job.<br /><br />hi, is it possible to manipulate the rendered widget? say, draw the widget on a 3d surface and rotate it in 3D . i want to implement some fancy ui with opengl and qt, but i don't know how to draw my widget on a texture. that's why i searched your blog.billconanhttps://www.blogger.com/profile/17270936813651107131noreply@blogger.comtag:blogger.com,1999:blog-6144115306124694421.post-62987193323943319302009-05-24T19:07:25.392+03:002009-05-24T19:07:25.392+03:00Hi Rivo
Great Work! I've also searched for so...Hi Rivo<br /><br />Great Work! I've also searched for something like that. However, you cannot use the #define protected public hack for Win32. Windows defines private and public entry points with different names in the library, so you will get linker errors. I have done my own hack, which allows to use your lib also under windows. The major changes where only public functions in the GLWidget like:<br /> virtual void myGlInit() {this->glInit();}<br /> virtual bool myEvent(QEvent *event) {return this->event(event);}<br /><br />and so on for the protected things in GLWidget, which Saurabh mentionned<br /><br />Then you only have to use these public functions in widgetproxy and it works fine, even under windows.Bernhard Kainzhttps://www.blogger.com/profile/10217470962347965692noreply@blogger.comtag:blogger.com,1999:blog-6144115306124694421.post-65191299182571415822009-03-07T20:14:00.000+02:002009-03-07T20:14:00.000+02:00@Saurabh: for some reason, I thought that you can'...@Saurabh: for some reason, I thought that you can't override access levels in C++ and e.g. make protected method a public one. But I just tested and actually you can.<BR/>I have to think about it a bit more; it wouldn't be very nice from OOP perspective since actually external classes shouldn't probably be able to call paintGL() or resizeGL(), but then again, the current solution is even uglier, so I'll probably make the change :)Rivo Lakshttps://www.blogger.com/profile/06873873820115729073noreply@blogger.comtag:blogger.com,1999:blog-6144115306124694421.post-89444301387167999472009-03-04T11:33:00.000+02:002009-03-04T11:33:00.000+02:00I was searching for something exactly like this an...I was searching for something exactly like this and came across this blog entry. I just wanted to say thanks as this has made my job much easier. Also I think there is no need for that #define protected public hack. Since GLWidget is inherited from QGLWidget, why not make the necessary functions public in GLWidget?<BR/><BR/>-Saurabh.GargAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6144115306124694421.post-70559512482044863272008-07-24T22:44:00.000+03:002008-07-24T22:44:00.000+03:00shamaz: yeah, I'll try and blog a bit more often i...shamaz: yeah, I'll try and blog a bit more often in general :-)<BR/>astrododge will most likely be the topic of my next post.Rivo Lakshttps://www.blogger.com/profile/06873873820115729073noreply@blogger.comtag:blogger.com,1999:blog-6144115306124694421.post-42956472892818063092008-07-24T22:02:00.000+03:002008-07-24T22:02:00.000+03:00Rivo, you should blog a bit more about astrodoge :...Rivo, you should blog a bit more about astrodoge :). It looks very good<BR/>I think this is the first I've ever seen about it. Great work !Anonymousnoreply@blogger.com