Qt-interest Archive, March 2008
close,min,max buttons disabled
Message 1 in thread
Hi everyone, I've developped my Qt 4.3 application on Windows and I've
ported it on mac os x 10.4 Tiger. It works ok but I've a strange problem, in
few windows I've the close,min,max buttons but not icons and they seem
disabled althought in other windows they work.
There's anyone have an idea about this problem or the solution .....
Thanks
Message 2 in thread
Hello,
I am trying to create a list of toolsets in our UI which can be
reordered using drag/drop. The toolsets in question are QWidgets which
contain sliders, spin boxes and buttons. Each toolset contains different
values.
I have tried to use QListWidget as a base, using setItemWidget() to pass
the toolset into each QListWidgetItem, however having read that this
isn't really used for dynamic data. I'm considering trying the
QListView, but it seems that this is unable to render widgets, only
"paint" them, I'm not sure I want to really draw the widgets myself.
The "Fridge Magnets" example looks interesting with the custom MIME
data, however its only passing text, whereas my toolsets contain a set
of data which is specific for each one.
Should we be using QListWidget, QListView or perhaps a custom
implementation of a list ourselves?
Thank you,
Tim Edwards
--
[ signature omitted ]
Message 3 in thread
Hi,
choice between QListWidget, QListView is the answer to this question:
do I need Model/View design pattern? (ie will data be displayed in more
than one view?)
For my opinion, when I can, I use Widget classes better then views.
I have anyway difficulties to manipulate Model/View concept with Qt
classes....
And if you want to know if it's difficult to drag other types than
default one proposed by Qt (text,url,..)
look at qmimedata doc, it's not hard to do.
using qbytearray, you can drag&drop all you want, including pointer (be
carefull if you delete dragged objet!!).
In code I'm writting actually I drag&drop (copy or move) QDomElement.....
AnyWay, You'll have to write a custom implementation of a QListWidget or
other container you choised.
because drag&drop need to write some event functions like
dragenterevent, dragmoveevent etc... to control drag, drop and return
info to user about drop authorized or not,
checking mime type and, maybe, other controls on the data itself.
hope this can help you to decide....
Veronique.
Tim Edwards a écrit :
> Hello,
>
> I am trying to create a list of toolsets in our UI which can be
> reordered using drag/drop. The toolsets in question are QWidgets which
> contain sliders, spin boxes and buttons. Each toolset contains
> different values.
>
> I have tried to use QListWidget as a base, using setItemWidget() to
> pass the toolset into each QListWidgetItem, however having read that
> this isn't really used for dynamic data. I'm considering trying the
> QListView, but it seems that this is unable to render widgets, only
> "paint" them, I'm not sure I want to really draw the widgets myself.
>
> The "Fridge Magnets" example looks interesting with the custom MIME
> data, however its only passing text, whereas my toolsets contain a set
> of data which is specific for each one.
>
> Should we be using QListWidget, QListView or perhaps a custom
> implementation of a list ourselves?
>
> Thank you,
> Tim Edwards
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 4 in thread
On 14.03.08 18:05:19, Véronique LEFRERE wrote:
> choice between QListWidget, QListView is the answer to this question:
> do I need Model/View design pattern? (ie will data be displayed in more
> than one view?)
>
> For my opinion, when I can, I use Widget classes better then views.
Well, wether or not the data is displayed in only one view is not the
only way to decide between the widget-based and and the view class.
Especially if you already have a model from your business logic side,
just wrapping that inside a model probably makes your app a lot faster
and also a lot less memory-hungry than replicating all the information
in a widget-based implementation. Also I think the view+model
combination scales better for a lot of entries (but I don't have any
numbers for that).
> I have anyway difficulties to manipulate Model/View concept with Qt
> classes....
It surely is a bit more complicated to setup a well-working model than
just creating a couple of items with text in a listwidget. But it pays
off if you have the need.
Andreas
--
[ signature omitted ]
Message 5 in thread
Yes, I agree, it's a a little too "simple" to say that the only question
is number of views of data.
Design may be taken in acount of course.
For my case, whan I worked on Qt3-->Qt4 migration, I only nedded to use
Qt MV(C) classes one time.
and the only time I had to migration from non mv to Qt4 mv, it was not
simple to "enter" in Qt Model/View module.
When you just have to display simple dta in simple way , this can seams
to not be so terrible.
But when you need to customize view, items look and/or behaviour,
selection, drag&drop, etc.... "aie! ma tête" like we say in french! :-)
I'm sure it's very powerfull but no easy to begin with. like it's
generally the case in "Qt World".
Andreas Pakulat a écrit :
> On 14.03.08 18:05:19, Véronique LEFRERE wrote:
>
>> choice between QListWidget, QListView is the answer to this question:
>> do I need Model/View design pattern? (ie will data be displayed in more
>> than one view?)
>>
>> For my opinion, when I can, I use Widget classes better then views.
>>
>
> Well, wether or not the data is displayed in only one view is not the
> only way to decide between the widget-based and and the view class.
> Especially if you already have a model from your business logic side,
> just wrapping that inside a model probably makes your app a lot faster
> and also a lot less memory-hungry than replicating all the information
> in a widget-based implementation. Also I think the view+model
> combination scales better for a lot of entries (but I don't have any
> numbers for that).
>
>
>> I have anyway difficulties to manipulate Model/View concept with Qt
>> classes....
>>
>
> It surely is a bit more complicated to setup a well-working model than
> just creating a couple of items with text in a listwidget. But it pays
> off if you have the need.
>
> Andreas
>
>