Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] treeWidget with mutiple windows/dialogs -Thanks
In C++ win32 I'd make a window with treeview and use GetClientRect, GetWindowRect then BeginDeferWindowPos and EndDeferWindowPos to position and size the window.
When i clicked tree node i'd then use ShowWindow for options.
I was wondering how i'd go about doing this in Qt.
andre last edited by
Why don't you, instead of describing how you think you should achieve something, describe what you would like to achieve? If you know how to do it (in your case: using the methods you mention), then what is the point of asking the question? There is no way for us to answer the question in a sane way if you don't tell us about your goals. Note that a sane answer may require suggesting an entirely different approach than what you currently have in mind.
Refer to the How to ask questions the smart way FAQ, especially "this":http://catb.org/~esr/faqs/smart-questions.html#goal section.
Thanks for your reply.
I did describe my goal but maybe not clear enough.
Anyways i stated that's for Win32 C++ using the APIs stated above would make it Windows specific only and would defeat the object of even using Qt hense why i asked the question.
Ok, i'd like a menu like VLC:
As you can see it's TreeView on the left using images (in Qt it's called treeWidget).
When you click the options for example "Audio" it will bring new dialog on the right hand side of treeWidget. This is the goal i'd like to achieve using Qt.
I will be open to changing to different approach if it's necessary. I never said that i wasn't willing to adapts my coding to Qt's methods.
andre last edited by
OK, it was not clear to me what you wanted to achieve; I am not familiar with the API you mentioned.
The type of dialog you want, can be achieved using a combination of two widgets: a QListView (or derived class) on the left with the icons, and a QStackedWidget with your pages of settings on the right. Note that you can also use a QTreeView, if you want a tree on the left instead of a list. Put those two widgets in a layout, and you have what you need.
Ok, my apologies on not being very descriptive on my issue I'll bare it in mind for future reference.
I've now resolved issue. Thank you.
Be sure and edit the thread title to add [Solved] if it's resolved. Thanks!