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 need a way to get data from outside of Custom QTextEdit Context Menu to generate a file..

I need a way to get data from outside of Custom QTextEdit Context Menu to generate a file..

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 264 Views
  • 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.
  • batistaB Offline
    batistaB Offline
    batista
    wrote on last edited by
    #1

    I need to receive data from main by sending a command over a signal emitted from the context menu. Or I need a way to read data from fields outside the context of the menu.

    ksnip_20230731-185959.png

    Thanks in advanced...

    M 1 Reply Last reply
    0
    • batistaB batista

      I need to receive data from main by sending a command over a signal emitted from the context menu. Or I need a way to read data from fields outside the context of the menu.

      ksnip_20230731-185959.png

      Thanks in advanced...

      M Offline
      M Offline
      mpergand
      wrote on last edited by
      #2

      @batista said in I need a way to get data from outside of Custom QTextEdit Context Menu to generate a file..:

      I need to receive data from main by sending a command over a signal emitted from the context menu.

      Define and emit a signal in MyTextEdit,
      and connect your MainWindow to receive that signal.

      batistaB 1 Reply Last reply
      1
      • M mpergand

        @batista said in I need a way to get data from outside of Custom QTextEdit Context Menu to generate a file..:

        I need to receive data from main by sending a command over a signal emitted from the context menu.

        Define and emit a signal in MyTextEdit,
        and connect your MainWindow to receive that signal.

        batistaB Offline
        batistaB Offline
        batista
        wrote on last edited by
        #3

        @mpergand I did and it worked fine for this part, to send to MainWindow.. It doesn't work when MainWindow comes back with the data.... The actions happen without problem. But the data arrives empty...

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mpergand
          wrote on last edited by
          #4

          @batista said in I need a way to get data from outside of Custom QTextEdit Context Menu to generate a file..:

          It doesn't work when MainWindow comes back with the data....

          What do you mean by "comes back" ?

          batistaB 1 Reply Last reply
          0
          • M mpergand

            @batista said in I need a way to get data from outside of Custom QTextEdit Context Menu to generate a file..:

            It doesn't work when MainWindow comes back with the data....

            What do you mean by "comes back" ?

            batistaB Offline
            batistaB Offline
            batista
            wrote on last edited by
            #5

            @mpergand I mean... I send a signal command to main with some data... And then in main, I get the data in my main form and send it back by emit to my "mytextedit", in a string. The data arrives empty. Although not empty. Because if I use a pushbutton to print the data on the console, it is displayed through qDebug() <<;.

            I'm only doing this because I haven't found any other alternative to access this data outside of the context menu..

            M 1 Reply Last reply
            0
            • batistaB batista

              @mpergand I mean... I send a signal command to main with some data... And then in main, I get the data in my main form and send it back by emit to my "mytextedit", in a string. The data arrives empty. Although not empty. Because if I use a pushbutton to print the data on the console, it is displayed through qDebug() <<;.

              I'm only doing this because I haven't found any other alternative to access this data outside of the context menu..

              M Offline
              M Offline
              mpergand
              wrote on last edited by
              #6

              @batista
              I see the method:
              MyTextEdit::receiveDataFromMain(Qstring)

              What prevents you to send the string directly from MainWindow.

              1 Reply Last reply
              0

              • Login

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