Skip to content

Installation and Deployment

Your Qt just doesn't want to build? Your compiler can't find the libs? Here's where you find comfort and understanding. And help.
9.8k Topics 51.2k Posts
  • Can't build qt-creator from git

    Unsolved
    5
    0 Votes
    5 Posts
    569 Views
    aha_1980A
    Hi @andro, There is a readme file in the source repo: https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md I compile Creator myself often on Ubuntu 18.04, as I'm submitting patches to Creator. I usually have a Qt version from the online installer (like 5.14.1) and just open qtcreator.pro in the installed Creator and then build. So far this runs very smoothly. I do, however exclude the QBS plugin and the Clang Code Model, as I don't have the corresponding development packages installed. Maybe you want to try a build without clang first? Regards
  • QThread

    Unsolved
    7
    0 Votes
    7 Posts
    781 Views
    S
    If you want to update a table widget in separate threads this will get quite involved. As mentioned before only the GUI thread is allowed to change widgets. Step 1 for you would be to replace the QTableWidget with a QTableView. The QTableView connects to a model which you'll have to implement yourself (by deriving from the right Qt model class). This approach will separate the data from the representation (i.e. the GUI). Now, you can manipulate the data in a separate thread. Even if you just have a single thread (different from the GUI thread) you need to think about synchronization. This will be the hard part to do right because you do not want any synchronization mechanisms in your model when updating the GUI. Here is my first hunch how you might not run into trouble: 1. Have a pointer to the actual data in your model class. You can make a copy of the data and modify the copy and finally by just swapping a pointer update the data. Even for large data the final swap will be fast. 2. Update the data of the model by calling a slot in the GUI thread. Make sure that the slot is executed inside the GUI thread and not the thread you are calling from. The event loop of the GUI thread will work as synchronization between updating the data and redrawing the QTableView. In this way the QTableView will never have a spliced view of mixed old and new data. 3. Finally update the QTableView by calling update() to refresh the widget. For making sure that the slot is executed in the GUI thread there are two approaches. The first is to connect a signal of the other thread with a slot of the model living in the GUI thread. Just emit the signal and everything will be fine. The other approach is to invoke a function explicitly in the context of the GUI thread: QMetaObject::invokeMethod(qGuiApp, [...](){ model->updateData(newDataPointer); tableView->update(); }); qGuiApp is the context object when invoking the function. If called from a different thread it will queue an event into the event loop of the GUI thread. Finally, if you want to update the data from two different threads at once, you might need more involved synchronization between these two threads. I would do this only after the approach I mentioned above works with only 1 additional thread.
  • [HELP] Exec function does not appear

    Unsolved
    2
    0 Votes
    2 Posts
    182 Views
    sierdzioS
    Can you rephrase the question? I totally don't understand what is your problem, what you are trying to run and how it fails.
  • Static build qt. Getting error because of xcb

    Solved
    18
    0 Votes
    18 Posts
    3k Views
    B
    @Tom-asso At first i installed libxkbcommon-dev then @BrMisha said in Static build qt. Getting error because of xcb: I have re-unziped sources and tried again. And... configure done))) Thank you very much))))
  • QT Installerframework is altering my string slashes

    Unsolved installer fw
    1
    0 Votes
    1 Posts
    466 Views
    No one has replied
  • Mac os versions

    Unsolved
    1
    0 Votes
    1 Posts
    193 Views
    No one has replied
  • How to compile/link source with debug flag?

    Solved
    2
    0 Votes
    2 Posts
    205 Views
    Tom assoT
    Run "configure" with the "-debug" flag, according to "configure --help"
  • 0 Votes
    6 Posts
    1k Views
    jeanmilostJ
    Thank you very much
  • Definitive guide to building source from downloaded .run file?

    Solved
    37
    0 Votes
    37 Posts
    8k Views
    Tom assoT
    Many thanks to all for your help in solving this problem for me! The following procedure to build Qt from the "offline installer" .run file, e.g. qt-opensource-linux-x64-5.14.2.run, works for me on ubuntu 18.04.4: Download .run file from "official release" site Execute the .run file downloaded in the previous step and answer questions prompted by the "wizard" Do the following: % cd <QtHome>/5.14.2/Src % ./configure -qt-xcb # I want to build Qt's xcb sources % make % make install # Installs into /usr/local/Qt5.14.2 by default To build Qt applications using those sources and libraries do the following: % export PATH=/usr/local/Qt5.14.2/bin:$PATH % export LD_LIBRARY_PATH=/usr/local/Qt5.14.2/lib:$LD_LIBRARY_PATH Setting PATH like this ensures that the qmake executable is properly associated with the headers and libraries you installed in /usr/local/Qt5.14.2.
  • Unable to build QT:Mqtt module

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    A
    @jsulm C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\include\cstddef:12: error: C1083: Cannot open include file: 'stddef.h': No such file or directory . This is the issue that I get
  • LGPL distribution in the Microsoft Store

    Unsolved licensing lgpl windows 10 microsoft uwp
    7
    1 Votes
    7 Posts
    1k Views
    sierdzioS
    @daljit97 said in LGPL distribution in the Microsoft Store: @sierdzio I suppose that could be an option I could consider, although I worry about piracy concerns. Well, either worry about that or about Qt license costs. If you break the LGPL then you become the pirate ;-) In this setup, if somebody gets the exe from you, they have already paid you. It does not solve the piracy problem, but does limit it somewhat.
  • 0 Votes
    8 Posts
    5k Views
    F
    @DavidJames Did this ever get resolved for you? I'm running into the exact same issue, seven years later!
  • Add license file to already configured QT

    Unsolved
    1
    0 Votes
    1 Posts
    345 Views
    No one has replied
  • Qt Creator 4.12.0 (Community) not working

    Unsolved
    12
    1 Votes
    12 Posts
    1k Views
    jsulmJ
    @atharva-karnik Please check what the correct QML plug-in name is in "Help/About Plugins..."
  • QMYSQL driver build problem

    Solved
    13
    0 Votes
    13 Posts
    1k Views
    M
    @worldpiece said in QMYSQL driver build problem: QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7 Hey, I did this successfully, like I think that you also did, as you have the QMYSQL driver. I had to copy libmysql, from the MySQL Server dir to my exe /debug/release folder together with the dependency libs from openssl, libssl-1_1-x64 libcrypto-1_1-x64 I also had to copy the qmysql drivers to a folder named sqldrivers my exe folder.. But a guy who just had this problem had to make fewer changes, all he needed to do was add the openssl libs to the exe/build folder, so maybe try that first.
  • 0 Votes
    2 Posts
    402 Views
    worldpieceW
    @worldpiece said in QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7: install_name_tool -change /usr/local/mysql/lib/libmysqlclient.21.dylib @rpath/libmysqlclient.21.dylib /Users/ing/Qt5.14.2/5.14.2/clang_64/plugins/sqldrivers/libqsqlmysql.dylib Found the problem -- step3 : change install_name_tool -change /usr/local/mysql/lib/libmysqlclient.21.dylib @rpath/libmysqlclient.21.dylib /Users/ing/Qt5.14.2/5.14.2/clang_64/plugins/sqldrivers/libqsqlmysql.dylib to install_name_tool -change @rpath/libmysqlclient.21.dylib /usr/local/mysql/lib/libmysqlclient.21.dylib /Users/ing/Qt5.14.2/5.14.2/clang_64/plugins/sqldrivers/libqsqlmysql.dylib solved!
  • PRI files and indirect dependencies

    Locked Unsolved
    2
    0 Votes
    2 Posts
    599 Views
    SGaistS
    Hi, Please don't post the same question in multiple sub-forums. One is enough. You had an answer in your other thread. Closing this one
  • 0 Votes
    6 Posts
    390 Views
    jsulmJ
    @devjb Maybe you could use https://doc.qt.io/qtinstallerframework/index.html ?
  • Problems with libqxcb.so

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    T
    Cool. Thanks a lot.
  • How to add Intel Performance Primitives to my project? ippInit() failure

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    D
    @SGaist I have selected System Environment for Build environment and there PATH exists. I have already added the binaries path to my System Environment PATH [image: 3b4faef8-fbb3-4c23-b02b-b01e94570c09.png] and my simple .pro file, I have changed it to this [image: a93046ae-9c80-49cd-a612-60f6ed9b374b.png] Now I was able to build the code. Both way of declaring the LIBS works fine. Either explicitly but with " " and use / instead of \ I used as User Variables: IPP_DIR = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\ipp\include IPP_LIB_X64 = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\ipp\lib\intel64_win and as System Variable INTEL_IPP_PATH = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\redist\intel64_win\ipp It worked fine. Keeping it here for whom getting trouble to add Intel Performance Primitives integration to Qt. [image: 183a1b9f-6be7-429a-99ed-926309049831.png]