Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I dont know why QString from QlineEdit is not working(
Forum Updated to NodeBB v4.3 + New Features

I dont know why QString from QlineEdit is not working(

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 259 Views 1 Watching
  • 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.
  • C Offline
    C Offline
    coutKateM
    wrote on last edited by
    #1
    This post is deleted!
    JonBJ 1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Run the app with debugger attached (F5) to see where it crashes.

      Also, please use code tags when pasting code here, it makes it easier to read. Example:

      ```
      void thisIsSomeCode();
      ```
      

      (Z(:^

      1 Reply Last reply
      2
      • Christian EhrlicherC Online
        Christian EhrlicherC Online
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @coutKateM said in I dont know why QString from QlineEdit is not working(:

        QLineEdit *myLineEdit = new QLineEdit(this);

        c++ basics - this is a local variable.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        5
        • C coutKateM

          This post is deleted!

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @coutKateM said in I dont know why QString from QlineEdit is not working(:

          qDebug()<<myLineEdit->displayText();

          As @Christian-Ehrlicher has said. If the line above compiles (which I believe you are saying it does), it indicates that you have a member variable named myLineEdit in interface.h, but you assigned to a different variable via QLineEdit *myLineEdit = ....

          1 Reply Last reply
          3

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved