Jump to content
• Advertisement

Public Group

QT Question

This topic is 2955 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

Share on other sites
Advertisement
Bump. For anything unclear please let me know. I am not a good writer sorry.

Share this post

Share on other sites
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

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

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

Share on other sites
Quote:
 Original post by kveePerhaps 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.

Thanks a lot! :)

Share this post

Share on other sites

• Advertisement
• Advertisement

• Popular Contributors

1. 1
2. 2
3. 3
Rutin
18
4. 4
JoeJ
14
5. 5
• Advertisement

• 14
• 10
• 23
• 9
• 32
• Forum Statistics

• Total Topics
632631
• Total Posts
3007531
• Who's Online (See full list)

There are no registered users currently online

×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!