Skip to content
  • 0 Votes
    8 Posts
    2k Views
    SGaistS
    One possible alternative could be to use a Docker container to build your application with a suitably old Ubuntu or maybe a VM which would be even simpler,
  • 0 Votes
    5 Posts
    1k Views
    C
    @JonB It's an internal (private) distro, based on som ancient version of Ubuntu, I guess. Preinstalled on all of thier machines, so I have to stick to that. (Hell they even have Qt4.8 preinstalled sxs!)
  • 0 Votes
    9 Posts
    1k Views
    P
    @JonB it works bro thank you problem fixed when i tried this before it doesn't open the window at all ... just flashing but now i understand why it's working Thank you <3
  • Absurd QT File Handling Issue(QFile)

    Solved C++ Gurus qfiledialog qfile qt5.6 c++ qt file read
    11
    0 Votes
    11 Posts
    3k Views
    S
    @JonB Thanks for your insight. I did as you suggested and found one of my local variable's address a nullptr(though not sure where it came from). I changed a few lines of code and apparently, my code works fine now. @Christian-Ehrlicher @J-Hilk thanks!
  • How to use qt webassembly in qml application?

    Unsolved Qt for WebAssembly qt5.6 webassembly
    7
    0 Votes
    7 Posts
    1k Views
    N
    @lorn-potter I have checked it in qt 5.15 with em 1.39.16. but still I have same problem.
  • 0 Votes
    7 Posts
    1k Views
    M
    @chehrlic said in Write Scheduler to run different pointer to member: I still don't see why a QTimer isn't enough - it can be started, stopped, can be run once or more, can execute any function given with any kind of parameters, even a lambda, ... there is nothing your description requires you to store the PMF by your own. But maybe QMetaMethod is something you can take a look on Well, like you said, QTimer alone could be enough at first sight, but if I want to "manage" them, or even organize them, I need a wrapper with some human-readable data. That's when the Task class comes handy. This is my current Task class, as of today: class Task : public QObject { Q_OBJECT public: typedef std::function<bool(QString&)> Function; private: QString m_name; Function m_function; QDateTime m_firstExec; int m_frequency; const Task *m_depends; QDateTime m_lastExec; bool m_lastStatus; QString m_failedReason; QMetaObject::Connection m_dependCnt; public: // Constructors/Getters/Setters signals: void starting(); void finished(bool status); public slots: void schedule(); void exec(); }; I'm stuck with a single type of Function stored (bool (QString&)), with the m_depends property I can wait for another Task to emit finished to effectively call schedule() (when I call schedule(), if there is a dependency, the task waits for the dependency's finished() to be emitted, then it calls schedule() on itself. When schedule() doesn't have to wait for anything, it calls QTimer::singleShot() with exec() as the slot, which itself calls the internal m_function stored. So I'm using a QTimer in the end, but with some extra properties. Except being stuck with a single type of function (I'm storing lambdas for now), I'm pretty happy with that, moreover if I need to build a widget showing the status of each of them. I will look at QMetaMethod also, thanks for your suggestions
  • 0 Votes
    6 Posts
    2k Views
    J
    @SGaist I tried the Qt 5.12.6 and it did the trick! Thanks. But interestingly, the title of the main application is no longer scaled by "Make text bigger" setting but the dockwidget ones does. I guess that there is an intention not to scale the main title. "Make everything bigger" setting does scale everything properly now except the titlebar height of only the main application looks not enough for the enlarged font size. I will give qt5.14 a try as well.
  • Programme QT ne reconnait les drivers MYSQL

    Unsolved French qt5.6 sqlite driver plugins drivers yocto
    6
    0 Votes
    6 Posts
    2k Views
    KroMignonK
    @nikoPol said in Programme QT ne reconnait les drivers MYSQL: Il n'y a pas d'autre moyen Non, il faut compiler les drivers pour votre cible avec les paramètres adéquats, soit directement à partir de Yocto, soit "à la main", à partir des sources de Qt. Peut-être que ce lien pourra vous être utile: https://www.udoo.org/forum/threads/solved-how-to-use-sql-model-with-qt5-layer.5136/ Désolé, je n'ai que des connaissances de base concernant Yocto... Et ca fait bien 3 ans que je ne l'ai plus mis en oeuvre!
  • 0 Votes
    2 Posts
    2k Views
    sierdzioS
    You need to sign your installer and app executable using a certificate. You can get such cert. from many companies, just Google for it. It costs between 100-400 US dollars, certificate is usually valid for a few years (1-3). Once you have the certificate, you can sign any exe with: signtool.exe sign /t http://timestamp.digicert.com /f yourCertFile.pfx app.exe And then verify the signature with: signtool.exe verify /pa /v app.exe The signtool.exe is part of Windows SDK, which you can get from Microsoft, free of charge.
  • 0 Votes
    1 Posts
    640 Views
    No one has replied
  • Change button color

    Moved Unsolved General and Desktop qt5.6
    4
    0 Votes
    4 Posts
    3k Views
    ValentinMicheletV
    If the question is "How to change a button's color?" the answer is probably something like myButton->setStyleSheet("background-color: red;"); If the question is how to "How to change the button's color WHEN some conditions" the answer could be [Somewhere inside a method] if (conditionsMet) { Q_EMIT(ChangeButtonColor()); } [somewhere in constructor, most likely] connect(this, &MyClass::ChangeButtonColor, this, [m_button](){ m_button->setStyleSheet("background-color: red;"); }); This is one way to connect signal/slot to actually change the button's color when some conditions are met. But the condition can be in another class than the one owning the button, the signal can be emitted by another component and not inside a method, and the code that changes the color can be in a method instead of a lambda. What might be useful would to copy/paste some code to help you more specifically. EDIT: @J.Hilk 's solution, tho a bit complicated for a beginner, is much more robust and pro. It depends on how serious your project is and if you have sufficient knowledge in Qt.
  • Qt5.6.3 Build issue with ARM64

    Unsolved Mobile and Embedded qt5.6 qtbase arm64 aarch64 embedded linux
    7
    0 Votes
    7 Posts
    4k Views
    SGaistS
    AFAIK, the BPI is very close to the Raspberry Pi, you should take a look at this wiki entry. By the way, why are you trying to build an outdated version of Qt ? The current LTS is the 5.9 series with 5.12 around the corner.
  • Is it possible to show video

    Unsolved General and Desktop qt5.6
    2
    0 Votes
    2 Posts
    625 Views
    jsulmJ
    @another_one You should start here: http://doc.qt.io/qt-5/multimediaoverview.html
  • Build and run problems with qtquick

    Unsolved General and Desktop qt5.6 qt quick build error
    18
    0 Votes
    18 Posts
    6k Views
    A
    @Linuxfluesterer No it's not the size of your hard drive, it's the size of the RAM allocated to that machine and how much it uses for /tmp. So do a df -h and you can post the output or at least see how much space you have on tmp. If it is less than the 1.4gb needed for the install, up it. Or as I suggested temporarily point /tmp to a hard disk if you don't have the ram for a bigger /tmp.
  • 0 Votes
    4 Posts
    2k Views
    mrjjM
    @hassene Hi and welcome Is there a reason you simply dont use a layout ? To make it autofollow the size of window ? if you place a QLabel on a form ( mainwindow.ui) , right click somewhere on empty form, and select Layout menu and select layout, the label will follow maniform. https://doc.qt.io/qt-5.10/examples-layouts.html
  • QSqlite query to excel file specific layout

    Unsolved General and Desktop qt5.6 excel qsqlite
    1
    0 Votes
    1 Posts
    696 Views
    No one has replied
  • 0 Votes
    13 Posts
    5k Views
    Y
    @mrjj Thakn you.
  • 0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi and welcome to devnet, You have to give more information about your setup. What device are you going to use ? What version of Qt ? What Linux distribution ? What graphical backend ?
  • Running Python script from Creator project

    Solved General and Desktop qtcreator qt5.6 cpp
    10
    0 Votes
    10 Posts
    6k Views
    U
    @SGaist Your comment was very helpful. I checked the contents by printing them and saw that when I called the process, the file was still being written (since I write a JSON file from the GUI). So I added one more line QFile.close() and now the python script is called only after JSON gets written from the GUI. Now it is running fine.
  • 0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, Please give the complete error log.