DirectX with Qt

Started by
34 comments, last by the_edd 13 years, 4 months ago
Yes,

why?
Advertisement
If you are just wanting only the scene, then just do it in the code rather than using QtDesigner, create it aggregated, then pass it to setCentralWidget and that's it, no layouts required as a QMainWindow already has a layout.
alliedwarrior: are you basing your form in Qt Designer on a QMainWindow or on a QWidget? From what I can gather from your screenshots, you're using a QWidget as a base but some of SeaBourne's advice is assuming a QMainWindow.
Quote:Original post by the_edd
alliedwarrior: are you basing your form in Qt Designer on a QMainWindow or on a QWidget? From what I can gather from your screenshots, you're using a QWidget as a base but some of SeaBourne's advice is assuming a QMainWindow.


In QWidget, but what would be the best choice?
thanks
Quote:If you do not set the parent of the widget you are inserting into the layout then it cannot appear as a child of the form widget. A widget without a parent is a top-level window regardless of which layouts you add it to. It doesn't show because it has not inherited the visibility of its parent (it doesn't have one).

To do this with Designer:
Drag a generic QWidget into the form widget
Promote that widget to QD3DWidget (from right-click menu) http://doc.trolltech.com/4.7/designe...m-widgets.html
Set the form widget layout to horizontal (it's on the Designer tool bar)
http://doc.trolltech.com/4.7/designer-layouts.html
Let Designer write the code for you

http://www.qtcentre.org/threads/36645-QHBoxLayout?p=168801#post168801

What the guy said qtcentre forum, worked perfectly :)

Only want to know how to access the methods of my class QD3DWidget
Quote:Original post by alliedwarrior
Only want to know how to access the methods of my class QD3DWidget


Hold on to a pointer to it.

This topic is closed to new replies.

Advertisement