PDA

View Full Version : help! how to code this gui with qt4?



khong_fly2008
31st March 2009, 04:35
i am a beginner with qt4

the following gui is what i want to code

but i don't know which class to use

so is there anybody can tell me how to code this gui?

the left window are some icon,

and the right window will show some pictures when i click the icon

how to do this ?

i will so appreciated if anyone can help me.

http://www.qtcn.org/bbs/attachment/Mon_0903/17_68917_1b9e306a975ca73.jpg

aamer4yu
31st March 2009, 06:02
You will mostly need QTreeWidget and delegates (QItemDelegate).

Have a look at these classes, and also study the examples in Qt Demos related to these classes. Rest when you get an idea, you can again post how to proceed further..:)

khong_fly2008
31st March 2009, 07:55
You will mostly need QTreeWidget and delegates (QItemDelegate).

Have a look at these classes, and also study the examples in Qt Demos related to these classes. Rest when you get an idea, you can again post how to proceed further..:)


thanks ! aamer4yu,i am so appreciate.

could you please give me some similar examples ?

by the way, in the left window,the icon means a dir.there are many pictures in each icon. so when i click the icon,the pictures in the dir should be show in the right window.this is my wanted.

spirit
31st March 2009, 08:12
create QTreeWidget and papulate this tree with QTreeWidgetItem.
using QTreeWidgetItem you can set icons, text aligment etc.
then you need to connect QTreeWidget::itemClicked or QTreeWidget::itemActivated with slot in wich you will set needed picture.

khong_fly2008
6th April 2009, 14:39
create QTreeWidget and papulate this tree with QTreeWidgetItem.
using QTreeWidgetItem you can set icons, text aligment etc.
then you need to connect QTreeWidget::itemClicked or QTreeWidget::itemActivated with slot in wich you will set needed picture.

:)

thanks

is there any similar code about this?