Results 1 to 17 of 17

Thread: how to conver QString to const char*

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: how to conver QString to const char*

    @high_flyer
    i think your reply to me has been replied, so there is no point i start flaming like you. so i will not answer your full post. but here it goes

    Quote Originally Posted by high_flyer View Post
    People, you should really stop with these "NEVER DO <something> OR THE WORLD WILL END" assertions.
    agreed. if i would have given the full explanation before, then things should have not gone this far.

    Quote Originally Posted by high_flyer View Post
    So relax.
    ok me relaxing. But read the rules of the internet, "all caps" are considered as screaming/shouting/flaming, so looks like the 'wiseguy' need some relaxing.


    EDIT:-
    and yes i just typed the constData() coz i have a habbit of using this function, it dosent matter in our OP case wether we use data() or constData(),
    Last edited by nish; 15th April 2011 at 13:16.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: how to conver QString to const char*

    so there is no point i start flaming like you.
    I was not flaming - and if it was perceived as such, then I am sorry.
    "all caps" are considered as screaming/shouting/flaming,
    true, and I meant it this way too.
    But please note the quotes "" - this is not something I am saying but others - I am quoting others - in this case you - I capitalized to make it a bit more extreme - but even with out capitalizing saying "never do ... !" is maybe not shouting but close.
    Ergo - since it was not me shouting, I was relaxed.
    And - a 'wiseguy' is not a wise guy - as in smart, rather it is meant more as a negative term - its a slang word for mafia members, trouble maker.

    P.S
    At times (and in recent times even more) I tend to react a bit harsh, the reason is, that there are a LOT of posts which are really stupid.
    Sometimes, I misjudge a post, and give it cold shower when it was not quite called for.
    But you will not find serious posts treated this way by me, and I have no problem saying sorry or that I made a mistake if I am proven wrong.
    Last edited by high_flyer; 15th April 2011 at 14:05.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: how to conver QString to const char*

    Quote Originally Posted by high_flyer View Post
    I was not flaming - and if it was perceived as such, then I am sorry.
    no problems .

    But please note the quotes "" - this is not something I am saying but others - I am quoting others - in this case you - I capitalized to make it a bit more extreme - but even with out capitalizing saying "never do ... !" is maybe not shouting but close.
    lets forget it. If i reply then you will reply then i will ... we will trap ourselves in a circular list!

    Ergo - since it was not me shouting, I was relaxed.
    looks like we both are in spa.

    And - a 'wiseguy' is not a wise guy - as in smart, rather it is meant more as a negative term - its a slang word for mafia members, trouble maker.
    here in India we use this term for a wise guy only.
    P.S
    At times (and in recent times even more) I tend to react a bit harsh, the reason is, that there are a LOT of posts which are really stupid.
    Sometimes, I misjudge a post, and give it cold shower when it was not quite called for.
    we all were stupids(newbies) once!! Just ignore the posts

    But you will not find serious posts treated this way by me, and I have no problem saying sorry or that I made a mistake if I am proven wrong.
    Thats the great thing about you!.

    Peace out.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: how to conver QString to const char*

    ere in India we use this term for a wise guy only.
    Based on your answer I figured as much.

    we all were stupids(newbies) once!! Just ignore the posts
    Just to make it clear: being newbie != posting stupid.
    There are newbie posts which are legitimate.
    Many even.
    But some just rather post and get spoon fed instead of first searching, investing some thought or simple search on google/docs - and at least try to get to the answer by them selves - resulting in a stupid post.
    The forum is here for asking and discussing Qt related issues, newbies SHOULD post and ask.
    But when you post show that you have invested at least some effort in finding the solution. (I don't mean you, but as a figure of peach).
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: how to conver QString to const char*

    Quote Originally Posted by high_flyer View Post
    Just to make it clear: being newbie != posting stupid.
    and thats why i wrote newbie in brackets().

    There are newbie posts which are legitimate.
    Many even.
    But some just rather post and get spoon fed instead of first searching, investing some thought or simple search on google/docs - and at least try to get to the answer by them selves - resulting in a stupid post.
    The forum is here for asking and discussing Qt related issues, newbies SHOULD post and ask.
    But when you post show that you have invested at least some effort in finding the solution. (I don't mean you, but as a figure of peach).
    yup.

Similar Threads

  1. How to convert QString to const char*
    By fulin in forum Newbie
    Replies: 7
    Last Post: 10th May 2010, 00:25
  2. char to const char* with atof
    By mickey in forum General Programming
    Replies: 5
    Last Post: 29th February 2008, 05:10
  3. convert from qstring to const char *
    By deepa.selvaraj in forum Qt Programming
    Replies: 3
    Last Post: 28th November 2007, 13:33
  4. QString to const char
    By TheRonin in forum Newbie
    Replies: 2
    Last Post: 12th February 2007, 15:43
  5. How to convert a QString to const char *?
    By SkripT in forum Newbie
    Replies: 2
    Last Post: 10th March 2006, 11:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.