Qt-interest Archive, March 2008
QTreeWidgetItem, icon alignment
Message 1 in thread
Hi,
I've already asked this question some time ago but I didn't get any answers.
So I'll try again, may be somebody can help me now.
How can I change the alignment of an icon in a TreeWidgetIcon? At the moment
all the icons in the treewidget are left aligned. I need them to be
centered. Is there an easy possibility to achieve this?
Thanks a lot in advance.
Alexander Semke.
--
[ signature omitted ]
Message 2 in thread
Hi All,
Imagine my frustration - new to Mac, new to XCode, new to all that
command line compiling business after coming from the pristine MS
environment.
I finally after a day of painful messing around get a QT Xcode app to
compile and begin my development.. BUT then I go and mess around with
it, and I break it and doesnt work. I delete everything and attempt to
start again.... and now I cant even get the simplest thing going with
XCode 3 and QT 4.3.4
Is there any kind soul out there that could send me a simple hello
world XCode project ready for me just to load up and go? I'm happy to
get attachments to my email address. Please.. before I start thowing
my toys out of the pram and reverting to my teenage years.
Peter
--
[ signature omitted ]
Message 3 in thread
On Thursday 20 March 2008 08:50:32 Peter Dove wrote:
> Hi All,
>
> Imagine my frustration - new to Mac, new to XCode, new to all that
> command line compiling business after coming from the pristine MS
> environment.
>
well i never used a mac, but if its similar to windows/gcc, you install binary
Qt, then you get a "Qt shell" entry in your menu from where you can just go
and type qmake; make.
if you dont have such an entry then the other option is you do it like on
linux, means just add qmake to your path. dont ask me where you do that on
mac, but assumed the mac shell is similar to the linux bash, you would just
do export PATH=$PATH:/path/to/qt/bin
then you go to your project directory (with the shell) type "qmake"
then "make".
it's very simple. To be honest i find the MS style with the play button quiet
more complex becouse its a huge barier if you try anything else but playing
around.
of course that all assumes you have the gcc toolchain in your path too. dunno
if mac brings them or the Qt binary install (on windows the installer can
optionaly download mingw). but you just have to find it and add it to your
path like above. try gcc -v and make -v to see if it works.
--
[ signature omitted ]
Message 4 in thread
If you have a working(*) Qt project, all you have to do is type:
qmake -spec macx-xcode
And qmake will create a working XCode project for you.
(*)By working Qt project I mean that you have a .pro file that is able
to build a working version of your application when you do a:
qmake
make
from the command line.
Sean
-----Original Message-----
From: Peter Dove [mailto:peterdove@xxxxxxx]
Sent: Thursday, March 20, 2008 3:51 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: throwing a Kevin
Hi All,
Imagine my frustration - new to Mac, new to XCode, new to all that
command line compiling business after coming from the pristine MS
environment.
I finally after a day of painful messing around get a QT Xcode app to
compile and begin my development.. BUT then I go and mess around with
it, and I break it and doesnt work. I delete everything and attempt to
start again.... and now I cant even get the simplest thing going with
XCode 3 and QT 4.3.4
Is there any kind soul out there that could send me a simple hello world
XCode project ready for me just to load up and go? I'm happy to get
attachments to my email address. Please.. before I start thowing my toys
out of the pram and reverting to my teenage years.
Peter
--
[ signature omitted ]
Message 5 in thread
On Thursday 20 March 2008 08:26:08 Alexander Semke wrote:
> Hi,
>
> I've already asked this question some time ago but I didn't get any
> answers. So I'll try again, may be somebody can help me now.
>
> How can I change the alignment of an icon in a TreeWidgetIcon? At the
> moment all the icons in the treewidget are left aligned. I need them to be
> centered. Is there an easy possibility to achieve this?
> Thanks a lot in advance.
>
>
yes, with a custom delegate:
http://doc.trolltech.com/latest/model-view-delegate.html
--
[ signature omitted ]
Message 6 in thread
On torsdag den 20. Marts 2008, Alexander Semke wrote:
> Hi,
>
> I've already asked this question some time ago but I didn't get any
> answers. So I'll try again, may be somebody can help me now.
>
> How can I change the alignment of an icon in a TreeWidgetIcon? At the
> moment all the icons in the treewidget are left aligned. I need them to be
> centered. Is there an easy possibility to achieve this?
> Thanks a lot in advance.
If you used QTreeView instead, I would have told you to return Qt::AlignCenter
when the role is Qt::AlignRole.
Bo.
--
[ signature omitted ]