Jump to content
  • Advertisement
Sign in to follow this  
Kasya

QT Question

This topic is 2859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,
I have currently decided to stick with QT for UI. As I started I got a problem. The problem is I want to use QT only for the ui (buttons, edit boxes, labels etc; NOT window itself) while QT creates its own window (QApplication). Is that possible to link QT to a previously created Win32, X11 Window?

I have found a constructor:
QApplication ( Display * display, int & argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0 ); //don't know if thats what I need though


but its only for X11. How to call the similar in Win32?

Thanks,
Kasya

Share this post


Link to post
Share on other sites
Advertisement
Perhaps what you're looking for is QWidget::create() ? But I have no idea how this actually works.

By the way, there exists a Qt mailing list with, I dare say, more concentrated Qt knowledge as well as forums such as qtcentre.org.

Share this post


Link to post
Share on other sites


Why would you want to use half-WIN32 and half-QT?

In terms of being able to make the application cross-platform, it would be advantageous to stick with QT for everything. You will get a more consistent look and fee, the code will be easier to manage, and you could easily make changes to the GUI with QT Designer.

Go all in or stay out. There are many things that QT will do better than you could ever hope to do (not knocking your ability...)

Share this post


Link to post
Share on other sites
Thanks for the replies. @gcs584: I don't actually want to stick with the qt. Just need it for the game editor. And even there I'll change it later. Writing a gui system takes time and drawing even more. That's why I needed qt. Anyways. I'll just go with win32/x11 gui.

Share this post


Link to post
Share on other sites
Quote:
Original post by kvee
Perhaps what you're looking for is QWidget::create() ? But I have no idea how this actually works.

By the way, there exists a Qt mailing list with, I dare say, more concentrated Qt knowledge as well as forums such as qtcentre.org.


Yeah, try this.

QWidget::create( WId winID, .. )

The first param is a WId, which is a platform specific handle to a window. So if you're using win32 get the handle to your window (HWND?), cast it to a WId, call this function and cross your fingers.

Also check out the qtcentre.org forums. They're good if you can't find any answers here and some of the Qt developers/employees hang around there.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!