Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Convert QString to unsigned char

    General and Desktop
    3
    3
    7569
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      janaki last edited by

      i have a lineedit,
      i have read the text using text() and assigned to QString variable
      QString s = ui->lineedit1->text();
      i have unsigned char variable mono ;
      how should i assign QString to unsigned char mono.

      can anyone help me

      1 Reply Last reply Reply Quote 0
      • D
        dreamerindia last edited by

        Hi,

        after QString s = ui->lineedit1->text();
        just type "s.to" and ctrl+space you will get the list of conversions.
        hope it helps.

        ~Ravivarman~

        1 Reply Last reply Reply Quote 0
        • L
          leon.anavi last edited by

          Check the FAQ: "How can I convert a QString to char* and vice versa?":http://qt-project.org/faq/answer/how_can_i_convert_a_qstring_to_char_and_vice_versa

          http://anavi.org/

          1 Reply Last reply Reply Quote 0
          • First post
            Last post