Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
that doesnt make sense. how do you know whether it is a child or not if everything has the same alignment?
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
thats what I said - everything will be at the same level.
'items it contains to be aligned with the expanded item'
items it contains = child items
expanded item = parent
to be aligned with =same level as
=> child items same level as parent
Maybe you aren't saying what you mean.
A picture might help
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
right. so thats a normal tree. That is what happens when you use qtreewidget/qtreeview, isn't it?
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
what is the point in you showing a picture of what already happens?! what information does that give anyone? how does that help explain what you want that is different?
THE PARENT ALIGNED WITH THE CHILD MAKES NO SENSE FOR A TREE. THAT IS A STRAIGHT LIST!!
and with that, I'm out. </dragons den>
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
treeView->setIndentation(0); // children will align to parent
treeView->setRootIsDecorated(false); // turn off expands button
treeView->setExpandsOnDoubleClick(true);