跳到內容

Brainstorm

Stuck? Some ideas just need to be dumped on someone before they can materialize.
456 主題 3.2k 貼文
  • 0 評價
    4 貼文
    885 瀏覽
    B
    Hello, Thank you for your help i used ".disconnect" to disconnect the previous json and then import the new json file Thank You.
  • Qt for linux Application

    Solved
    9
    0 評價
    9 貼文
    2k 瀏覽
    ODБOïO
    @sierdzio thxs ! i did not know NUC it looks very close to what we need, thank you
  • software/app for PC and mobile device

    Unsolved
    6
    0 評價
    6 貼文
    1k 瀏覽
    B
    Thank you for these informations. It is important to know that Qt is not exclusively a nice tool for GUI, and it makes live easier also for other things like managing files. We start studying it more seriously.
  • QSlider inside layout, update on resize.

    Unsolved
    11
    0 評價
    11 貼文
    4k 瀏覽
    Pradeep P NP
    @Lezginohohol Did you try the sample code in macOS ? I did test on Windows, Ubuntu & macOS. It works fine.
  • I'm doing it wrong...again

    Solved
    12
    0 評價
    12 貼文
    2k 瀏覽
    mzimmersM
    Yep...I should have specified "this" as the first argument in the invokeMethod() call. Seems to be working now. Here are some snippets: UdpSocket::UdpSocket(QObject *parent) : QObject(parent) { bool rc; // set up addresses. m_addrRecv.setAddress(QHostAddress::AnyIPv4); m_addrSend.setAddress(MCAST_GROUP); rc = QMetaObject::invokeMethod(this, "sendDiscoveryMsgs", Qt::QueuedConnection); } void UdpSocket::sendDiscoveryMsgs() { qnil = QNetworkInterface::allInterfaces(); // for each viable interface, create and configure a socket. for (it = qnil.begin(); it != qnil.end(); ++it) { sock = new QUdpSocket; sock->bind(m_addrRecv, MCAST_PORT, QAbstractSocket::ShareAddress | QAbstractSocket::ReuseAddressHint); QObject::connect(sock, &QUdpSocket::readyRead, this, &UdpSocket::checkResponse); m_sock = sock; // the send() below uses m_sock. send(str); } } void UdpSocket::checkResponse() { int rc = recv(); if (rc == 0) // got a valid response { if (m_msgStr.find(MsgTypeText[MSG_DISCOVERY_ACK]) != string::npos) { m_sock = qobject_cast<QUdpSocket *>(sender()); m_qni = new QNetworkInterface; *m_qni = m_socketInterfaceMap[m_sock]; QObject::disconnect(m_sock, &QUdpSocket::readyRead, this, &UdpSocket::checkResponse); QObject::connect(m_sock, &QUdpSocket::readyRead, this, &UdpSocket::recv); QObject::connect(m_sock, &QUdpSocket::disconnected, this, &UdpSocket::reconnect); } } } I have a minor memory leak in that I don't destroy the unused sockets after I find the right one, but this way I don't have to maintain a list of the sockets while I'm trying to determine the "good" one. Thanks for the help.
  • Latest soapbox rant...quality of offline Qt documentation

    Unsolved
    3
    0 評價
    3 貼文
    1k 瀏覽
    JKSHJ
    @Kent-Dorfman Good timing. There is a 2-day intensive workshop this coming Monday for improving the docs: https://blog.qt.io/blog/2019/03/01/the-future-of-documentation/ I encourage you to get in touch with Paul Wicking ASAP by posting in the blog comments, so that your complaints can be taken on board during the workshop.
  • Virtual Keyboard in QT Widget Application

    Unsolved
    2
    0 評價
    2 貼文
    1k 瀏覽
    SGaistS
    Hi and welcome to devnet, Do you mean like the QtVirtualKeyboard module ?
  • 0 評價
    1 貼文
    548 瀏覽
    尚無回覆
  • 0 評價
    7 貼文
    2k 瀏覽
    JonBJ
    @BeastBook ID = "+36+" and not working with with this "'+36+'" .I am little confused it worked with ' ' when i use for editing updating inserting but not for searching Your ID column holds an integer, not a SQL string. You should not be quoting it (inside ''s) whether in a WHERE or INSERT or UPDATE, then you won't have consistency issues.
  • Using webassembly Qt on Documentation Site

    Unsolved
    4
    0 評價
    4 貼文
    1k 瀏覽
    SGaistS
    Hi, While it could be interesting to play with the examples live, it would make the documentation way heavier to build and store.
  • Needing help with designing a report manager app

    Solved mysql windows server linux sql
    14
    0 評價
    14 貼文
    4k 瀏覽
    K
    what is your suggestion about server app design ? People usually refer to "server app" as "middleware" or "web application". There are tons of web frameworks and ORMs for various languages including Java and C# on "enterprise" side and scripting languages (pphp, python, perl, ruby, node.js). C++ is not really convenient language here. As for protocol, if you are not pursuing real-time data processing with lowest possible latency, it makes sense to use REST API on top of HTTP, so that on server side you have the most typical "web app" with ORM inside and REST outside, and on client side you can easily add web client if needed, and even if not, you get some additional convenience as compared to e.g. RPC over plain TCP
  • Adding other Project to Qt like PoDoFo (LGPL)

    Solved
    8
    0 評價
    8 貼文
    2k 瀏覽
    K
    @SeppyQT said in Adding other Project to Qt like PoDoFo (LGPL): Isn't pdfium made by Google? It is, so in order to contribute you'll have to comply to their terms, and maintain your code as well
  • Why isn't QLayout a QWidget?

    Solved
    22
    0 評價
    22 貼文
    6k 瀏覽
    JonBJ
    @Konstantin-Tokarev Crikey, are we not supposed to use DIVs for layout any more? I'm only just getting off TABLEs....
  • trying to open what i started from Mac on Windows

    Unsolved
    7
    0 評價
    7 貼文
    2k 瀏覽
    SGaistS
    #!/usr/bin/env python import sys from PyQt5.QtWidgets import QApplication from PyQt5.QtWidgets import QWidget if __name__ == "__main__": app = QApplication(sys.argv) widget = QWidget() widget.show() sys.exit(app.exec_())
  • want to add a graphic to a table

    Unsolved
    14
    0 評價
    14 貼文
    3k 瀏覽
    Gojir4G
    @VRonin said in want to add a graphic to a table: One more note: This QAbstractItemView *view = qobject_cast<QAbstractItemView *>(parent()); is unsafe as hell. Nothing says the delegate should be a child of the view. in fact you can use the same delegate in multiple views. the correct way to get the model is index.model() without passing from the view Thanks for signaling the issue. I have fixed my sample code above.
  • What approach do you take for dialogs where an action is to be performed?

    Solved
    19
    0 評價
    19 貼文
    5k 瀏覽
    JKSHJ
    @JonB said in What approach do you take for dialogs where an action is to be performed?: Invoker is a page with multiple buttons, each one leading to an action/dialog. There is no room/clarity to start having that offer sub-options etc. Something like QToolBox can help. It can show every available "action", yet only expose the buttons + parameters of one action at any given time time.
  • writing to mysql table

    Unsolved
    6
    0 評價
    6 貼文
    2k 瀏覽
    kshegunovK
    There are examples in the documentation you should explore. On possibility is: QString myStringArgument = "whatever it is"; QSqlQuery query; if (!query.prepare("INSERT INTO tableName (columnName) VALUES (?)")) ; // Handle error query.addBindValue(myStringArgument); if (!query.exec()) ; // Handle error
  • reducing signal/slot indirection

    Solved
    10
    0 評價
    10 貼文
    3k 瀏覽
    mzimmersM
    Thanks, Konstantin. I'll keep that in mind for future projects.
  • requesting advice on using QtSharp/CppSharp

    Unsolved
    3
    0 評價
    3 貼文
    1k 瀏覽
    VRoninV
    You can use C++/CLI (that is C++ building for CLR) to build a simple wrapper on the unmanaged C++ code that can be exposed directly to C#. If you want an example of exposing a Qt API to .Net you can check here
  • qt not recognizing javac

    Unsolved
    4
    0 評價
    4 貼文
    1k 瀏覽
    SGaistS
    What undefined reference ?