C++ Qt 121 - Single Instance Applications

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 15

  • @rolandmeiner4970
    @rolandmeiner4970 10 ปีที่แล้ว +5

    We love seeing you type, because it gives us the ability to "think into" the code. If I see code and do not write it, I read it like a book. Thus, I usually read over things that might be important. When you write and I see you writing, I must be slow in my reading and catch and understand more of the code. But that is just me...

  • @aliancemd
    @aliancemd 10 ปีที่แล้ว

    I recommend people in general to avoid the old signal slots syntax in Qt 5.0+. The new syntax can help you catch a few errors at compile time(like wrong signals and slots definitions).
    Thanks for keeping up the good work...

  • @Resurr3ction
    @Resurr3ction 10 ปีที่แล้ว +2

    At 12:40 you use 'foreach' while it would be better to use c++11 'for'. The syntax is 'for(const QString &str : arg) { }' It is many times faster than Qt foreach and it does not copy the container (like foreach does) and thus allow modifying the elements if needed. Superb video none the less. :-)

    • @VoidRealms
      @VoidRealms  10 ปีที่แล้ว

      good to know :)

    • @aliancemd
      @aliancemd 10 ปีที่แล้ว

      I was thinking the same. In this particular case it's not very bad since QString copy operation by default uses implicit sharing so it's not very expensive but anyways, I've seen many people use foreach wrongly(In production code)... If you have a C++11 compatible compiler then I like to do "for(auto& elem : container)".

  • @yupitsmaple
    @yupitsmaple 10 ปีที่แล้ว

    Hell yes you're back to Qt

  • @avtem
    @avtem 5 ปีที่แล้ว

    I didn't have that bug, because I gave it a name "newInstanceLaunched". I think "newConnection" is not a good name for a signal
    Thank you for awesome tutorial! It works!
    p.s.I like to watch you typing! This makes it a little more like tutorial

  • @RaiOmido
    @RaiOmido 8 ปีที่แล้ว +1

    Damn!! Exactly what I've been looking for for days. Thanks yoh

  • @LariviereChris
    @LariviereChris 10 ปีที่แล้ว +1

    I believe it's called Berkeley's Sockets in UNIX. What you were referring to in the beginning of your video. However, I might be wrong!

  • @DedmenMiller
    @DedmenMiller 10 ปีที่แล้ว +2

    If you need some ideas for topics:
    SSL Server
    JSON
    QTs Multimedia stuff like recording and playing audio

  • @Michalos86
    @Michalos86 7 ปีที่แล้ว

    For this solution to work on Windows (tried on 10) you should set setSocketOptions() to QLocalServer::WorldAccessOption (or what you need) for your QLocalServer object.

  • @stibog
    @stibog 10 ปีที่แล้ว

    On Gentoo 64bit Qt 5.4.0
    SingleInstance::HasPrevious()
    {
    .....
    ..
    socket.write();
    }
    This did not produce any readyReady() in the first prorgam opened.
    I had to do a socket.flush(); after write for it to work :) Just like with tcp/ip sockets..

  • @killuazaoldyeck1416
    @killuazaoldyeck1416 10 ปีที่แล้ว

    i need to make a Custom Widget