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. Delete message after x seconds
Forum Updated to NodeBB v4.3 + New Features

Delete message after x seconds

Scheduled Pinned Locked Moved Solved General and Desktop
qtimerlabelremove text
25 Posts 5 Posters 10.2k Views 2 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 23 Feb 2017, 22:20 last edited by
    #11

    Then you should first check which version of Qt TeamSpeak is using and its architecture.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      QT-static-prgm
      wrote on 24 Feb 2017, 09:48 last edited by QT-static-prgm
      #12

      @SGaist it says nothing about the architecture. But the Software is x64 (I'm sure because x86 plugins do not work and it's installed to Program Files instead of Program Files x86)
      The version is 5.6.1

      ==EDIT==

      the project setup was garbage. So i made a new clean project structure and pushed to this repo: https://git.rwth-aachen.de/carstenf/qtTsOverlay/tree/master

      nothing changed, it's just on my local harddrive and the project link

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 24 Feb 2017, 10:49 last edited by
        #13

        Then you should use the same version as they are to build your plugin.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • Q Offline
          Q Offline
          QT-static-prgm
          wrote on 24 Feb 2017, 11:14 last edited by
          #14

          did qt 5.6 already supported lampda instead of slots??

          M 1 Reply Last reply 24 Feb 2017, 11:48
          0
          • Q QT-static-prgm
            24 Feb 2017, 11:14

            did qt 5.6 already supported lampda instead of slots??

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 24 Feb 2017, 11:48 last edited by
            #15

            @QT-static-prgm
            Hi
            Its foremost a compiler thing. (c++11)
            and then Qt
            https://wiki.qt.io/New_Signal_Slot_Syntax

            1 Reply Last reply
            0
            • Q Offline
              Q Offline
              QT-static-prgm
              wrote on 24 Feb 2017, 12:34 last edited by
              #16

              I just added an own QTimer to my program and removed the static signelshot. Now it looks like this:
              https://git.rwth-aachen.de/carstenf/qtTsOverlay/blob/master/overlaycontroller.cpp#L22

              But NOTHING happens. even after 30 sec there is still no output. Any ideas about that??

              While i'm playing a bit around with the qtimer and an other problem i compile qt 5.6.1 for vs x64. Hopefully the singleshot works then.

              M J 2 Replies Last reply 24 Feb 2017, 12:41
              0
              • Q QT-static-prgm
                24 Feb 2017, 12:34

                I just added an own QTimer to my program and removed the static signelshot. Now it looks like this:
                https://git.rwth-aachen.de/carstenf/qtTsOverlay/blob/master/overlaycontroller.cpp#L22

                But NOTHING happens. even after 30 sec there is still no output. Any ideas about that??

                While i'm playing a bit around with the qtimer and an other problem i compile qt 5.6.1 for vs x64. Hopefully the singleshot works then.

                M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 24 Feb 2017, 12:41 last edited by mrjj
                #17

                @QT-static-prgm
                Hi
                This is wrong
                connect(m_timer, SIGNAL(timeout()), this, SLOT(debugPrint("HUHU")));

                You CANNOT add parameters/values to the connect. HUHU is 100% wrong.
                and please check the return value or use the new syntax.

                qDebug() <<" conn ok:" << connect(m_timer, SIGNAL(timeout()), this, SLOT(debugPrint()));

                and debugPrint should not have any paramters

                void OverlayController::debugPrint(QString text)

                Please read the docs
                http://doc.qt.io/qt-5/signalsandslots.html
                its very important to understand how it works.

                1 Reply Last reply
                1
                • Q QT-static-prgm
                  24 Feb 2017, 12:34

                  I just added an own QTimer to my program and removed the static signelshot. Now it looks like this:
                  https://git.rwth-aachen.de/carstenf/qtTsOverlay/blob/master/overlaycontroller.cpp#L22

                  But NOTHING happens. even after 30 sec there is still no output. Any ideas about that??

                  While i'm playing a bit around with the qtimer and an other problem i compile qt 5.6.1 for vs x64. Hopefully the singleshot works then.

                  J Offline
                  J Offline
                  J.Hilk
                  Moderators
                  wrote on 24 Feb 2017, 12:42 last edited by
                  #18

                  @QT-static-prgm

                  connect(m_timer, SIGNAL(timeout()), this, SLOT(debugPrint("HUHU")));
                  

                  I'm pretty sure you can't give a Slot a parameter like that. You don't get an error because the old syntax checks signal slots during run not compile time.

                  but in your console you should get an error warning when yiu start the programm concerning Signal/slot connection.

                  //have you tried it like this ? since its qt5+ that you're using
                  
                  QTimer::signleShot(100, this, [=]{qDebug() << " huhu";});
                  

                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  1 Reply Last reply
                  0
                  • Q Offline
                    Q Offline
                    QT-static-prgm
                    wrote on 24 Feb 2017, 13:02 last edited by QT-static-prgm
                    #19

                    @J-Hilk please read the posts above. That causes a procedure error.

                    @mrjj You are right. without parameter works it just fine.

                    But i cannot use qDebug() since i don't have any console or something like that. My debugPrint(QString text) just writes to a new Label.

                    ==UPDATE==

                    https://git.rwth-aachen.de/carstenf/qtTsOverlay/blob/master/overlaycontroller.cpp

                    That way it works just the way it should. After 5 sec the chat lines are hide and if you write something it is displayed again :D
                    qt is still compiling, so when it's done i'm gonna test the singleshot

                    M 1 Reply Last reply 24 Feb 2017, 13:16
                    0
                    • Q QT-static-prgm
                      24 Feb 2017, 13:02

                      @J-Hilk please read the posts above. That causes a procedure error.

                      @mrjj You are right. without parameter works it just fine.

                      But i cannot use qDebug() since i don't have any console or something like that. My debugPrint(QString text) just writes to a new Label.

                      ==UPDATE==

                      https://git.rwth-aachen.de/carstenf/qtTsOverlay/blob/master/overlaycontroller.cpp

                      That way it works just the way it should. After 5 sec the chat lines are hide and if you write something it is displayed again :D
                      qt is still compiling, so when it's done i'm gonna test the singleshot

                      M Offline
                      M Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on 24 Feb 2017, 13:16 last edited by
                      #20

                      @QT-static-prgm
                      Ok so you do not run program from Creator ?

                      1 Reply Last reply
                      0
                      • Q Offline
                        Q Offline
                        QT-static-prgm
                        wrote on 24 Feb 2017, 16:36 last edited by
                        #21

                        @mrjj No i write the code in Visual Studio and compile to .dll that comes to the plugin folder from TeamSpeak3 and TS will load it.

                        M 1 Reply Last reply 24 Feb 2017, 16:56
                        0
                        • Q QT-static-prgm
                          24 Feb 2017, 16:36

                          @mrjj No i write the code in Visual Studio and compile to .dll that comes to the plugin folder from TeamSpeak3 and TS will load it.

                          M Offline
                          M Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on 24 Feb 2017, 16:56 last edited by
                          #22

                          @QT-static-prgm

                          Oh, that way. so the qt code is inside your custom TS plugin.
                          "yeah the labels work fine."
                          As i understand it, you are already using the Qlabel classes or some other
                          part of Qt and only the QTimer gives errors?

                          1 Reply Last reply
                          0
                          • Q Offline
                            Q Offline
                            QT-static-prgm
                            wrote on 24 Feb 2017, 17:04 last edited by
                            #23

                            @mrjj yes that's right (did you look in my code??)

                            I just finished compiling qt 5.6.1 for x64 VS and now the singleshot works fine. So it need to be a problem of the newer version.

                            So now i have multiple ways to implement my chat disable function:

                            1. with single shot and lambda to delete every single line after 5 sec
                            2. the way it is right now, display the latest 5 lines and just hide them after 5 sec. when something is written again, it's shown again.

                            But that's a kind of Luxus problem, now that it is working. Now i have just 2 other big problems (label transparency, and stay always infront does nto work for games in fullscreen). When those are fixed i can start with the cosmetic :D

                            First i need to solve the main functionality. Maybe you can help me with the transparency problem, too.

                            M 1 Reply Last reply 24 Feb 2017, 17:34
                            0
                            • Q QT-static-prgm
                              24 Feb 2017, 17:04

                              @mrjj yes that's right (did you look in my code??)

                              I just finished compiling qt 5.6.1 for x64 VS and now the singleshot works fine. So it need to be a problem of the newer version.

                              So now i have multiple ways to implement my chat disable function:

                              1. with single shot and lambda to delete every single line after 5 sec
                              2. the way it is right now, display the latest 5 lines and just hide them after 5 sec. when something is written again, it's shown again.

                              But that's a kind of Luxus problem, now that it is working. Now i have just 2 other big problems (label transparency, and stay always infront does nto work for games in fullscreen). When those are fixed i can start with the cosmetic :D

                              First i need to solve the main functionality. Maybe you can help me with the transparency problem, too.

                              M Offline
                              M Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on 24 Feb 2017, 17:34 last edited by
                              #24

                              @QT-static-prgm
                              Yes i did read code but didn't see the linker options so was just asking to understand the full extend.
                              About the label transparency.
                              Could you link an image ( external site) so its perhaps more clear the result you get.
                              in
                              https://forum.qt.io/topic/76586/semi-transparent-qlabel-background/5

                              Q 1 Reply Last reply 24 Feb 2017, 19:20
                              0
                              • M mrjj
                                24 Feb 2017, 17:34

                                @QT-static-prgm
                                Yes i did read code but didn't see the linker options so was just asking to understand the full extend.
                                About the label transparency.
                                Could you link an image ( external site) so its perhaps more clear the result you get.
                                in
                                https://forum.qt.io/topic/76586/semi-transparent-qlabel-background/5

                                Q Offline
                                Q Offline
                                QT-static-prgm
                                wrote on 24 Feb 2017, 19:20 last edited by
                                #25

                                @mrjj as i told you in the thread, it looks the same as on your picture. But it should be transparent, so you can see the code lines from the editor below in your case.

                                But let's continue that in the other thread

                                1 Reply Last reply
                                0

                                20/25

                                24 Feb 2017, 13:16

                                • Login

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