Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, May 2005
Okay, I'm stumped...


Message 1 in thread

How are you supposed to create a variable that contains a single
member with spaces in it?  I thought that it was by using quote()
but that doesn't seem to work.

I've even tried using quote() with a backslash-space in it - that
adds the backslash happily to the output and still gives me a
multiple-member var.


Message 2 in thread

Hello Gordon,


On Thu, 19 May 2005 18:37:26 -0600 "Schumacher, Gordon"
<gordon_schumacher@xxxxxxxxxx> wrote:

> How are you supposed to create a variable that contains a single
> member with spaces in it?  I thought that it was by using quote()
> but that doesn't seem to work.
> 
> I've even tried using quote() with a backslash-space in it - that
> adds the backslash happily to the output and still gives me a
> multiple-member var.

If you mean to protect spaces in a string that contains something similar to
a command-line (that's an example), by surrounding w/ quotes, then you'll
have to implement the \ (\\, \") protecting by yourself, Qt doesn't provide
QString tools for that. It's not that simple but not too complex anyway, a
kind of classical exercise.


Regards,

-- 
 [ signature omitted ] 

Message 3 in thread

Schumacher, Gordon wrote:
>
> How are you supposed to create a variable that contains a single
> member with spaces in it?  I thought that it was by using quote()
> but that doesn't seem to work.
> 
> I've even tried using quote() with a backslash-space in it - that
> adds the backslash happily to the output and still gives me a
> multiple-member var.

I have absolutely no idea what you mean.  White-space is irrelevant in C++,
although the pre-processor will preserve it in string literals.  Also, I can
find no reference to the 'quote()' function in the Qt help, linux man pages
or MSDN.

Can you post a short code example of what you're trying to achieve?

Chris
--
 [ signature omitted ] 

Message 4 in thread

Only reference I could find to a quote(...) method was in the Python
documentation.

Sam

-----Original Message-----
From: wwp [mailto:subscript@xxxxxxx] 
Sent: Friday 20 May 2005 08:55
To: qt-interest@xxxxxxxxxxxxx
Subject: Re: Okay, I'm stumped...

Hello Gordon,


On Thu, 19 May 2005 18:37:26 -0600 "Schumacher, Gordon"
<gordon_schumacher@xxxxxxxxxx> wrote:

> How are you supposed to create a variable that contains a single
> member with spaces in it?  I thought that it was by using quote()
> but that doesn't seem to work.
> 
> I've even tried using quote() with a backslash-space in it - that
> adds the backslash happily to the output and still gives me a
> multiple-member var.

If you mean to protect spaces in a string that contains something
similar to
a command-line (that's an example), by surrounding w/ quotes, then
you'll
have to implement the \ (\\, \") protecting by yourself, Qt doesn't
provide
QString tools for that. It's not that simple but not too complex anyway,
a
kind of classical exercise.


Regards,

-- 
 [ signature omitted ] 

Message 5 in thread

Sorry, my mistake - I should have been more specific.  This is in
reference to a QMake makefile.

-----Original Message-----
From: Schumacher, Gordon [mailto:gordon_schumacher@xxxxxxxxxx]
Sent: Thursday, May 19, 2005 6:37 PM
To: QT Interest (E-mail)
Subject: Okay, I'm stumped...


How are you supposed to create a variable that contains a single
member with spaces in it?  I thought that it was by using quote()
but that doesn't seem to work.

I've even tried using quote() with a backslash-space in it - that
adds the backslash happily to the output and still gives me a
multiple-member var.