Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    27 Views
    No one has replied
  • Unable to build and run the basic project

    Solved
    6
    0 Votes
    6 Posts
    511 Views
    V
    @Vijaykarthikeyan I uninstalled and reinstalled the compilers..now it is working..But,it is important to learn about configuring the Qt projects
  • QML module not found (QtQuick.Studio.Components 1.0)

    Unsolved qml qml qml modules qtquick
    3
    0 Votes
    3 Posts
    2k Views
    QjayQ
    @JoeCFD QML file code below. I haven't edited it at all. QT += quick CONFIG += c++11 # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Refer to the documentation for the # deprecated API to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp RESOURCES += qml.qrc # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
  • QPluginLoader Failed to load qsqlmysql.dll

    Moved Solved
    9
    0 Votes
    9 Posts
    700 Views
    J
    Here is a final version on how to solve this related matter. Ensure that you have set your system path for mysql. SET PATH=%PATH%;[mysql/bin] In your cmakelist, link mysql library to project set(MYSQL_DIR "C:/Program Files/MySQL/MySQL Server 8.0") set(MYSQL_INCLUDE_DIR "${MYSQL_DIR}/include") find_library(MYSQL_LIBRARY NAMES mysql PATHS ${MYSQL_DIR}/lib ) target_link_libraries(target ${MYSQL_LIBRARY} ) If you like to deploy the project to other pc, please ensure that you have included necessary file needed for mysql. For my case, the mysql version I'm using is MySQL Server 8.0. What I need to do was copy libcrypto-3-x64.dll, libssl-3-x64.dll and libmysql.dll to my project directory. Here a cmakelist version of copy the dlls needed. set(MYSQL_REQUIRED_FILES "${MYSQL_DIR}/bin/libcrypto-3-x64.dll" "${MYSQL_DIR}/bin/libssl-3-x64.dll" "${MYSQL_DIR}/lib/libmysql.dll" ) foreach(SOURCE_FILE IN LISTS MYSQL_REQUIRED_FILES) get_filename_component(FILE_NAME ${SOURCE_FILE} NAME) add_custom_command (TARGET appManualEDI POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE_FILE} ${CMAKE_BINARY_DIR}/${FILE_NAME} COMMENT "Copying ${FILE_NAME} to ${CMAKE_BINARY_DIR}" ) endforeach()
  • File Not Found

    Unsolved
    3
    0 Votes
    3 Posts
    321 Views
    R
    @jsulm QML was not installed, I installed it in the Software Manager (LM21.2) but KDevelop still shows the <QQmlApplicationEngine> file is not found. There is a huge number of QML installs in the Software Manager but I didn't see any that mentioned header files for QML.
  • Using QPainter to draw on a QPixmap and save it

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    canellasC
    @JonB Yes, you are correct. Unlike QPdfWriter, QPixmap must be big enough for the image that is to be drawn. Thanks!
  • How to use tls plugin in CMake

    Unsolved
    2
    0 Votes
    2 Posts
    287 Views
    SGaistS
    Hi, I haven't tested it yet but this Qt blog article might be what you are looking for.
  • 0 Votes
    26 Posts
    14k Views
    JoeCFDJ
    @SGaist Thanks for your reply. The random crash may be caused by corrupt memory. Will use valgrind to check the code out.
  • QTimer

    Unsolved
    5
    0 Votes
    5 Posts
    351 Views
    Pl45m4P
    @Rumeysa_135 said in QTimer: but I cannot do this on the 2nd page. The pages should only be a representation of your data. You still retrieve the data every 2 seconds and display the data you want to show on page/widget 1 and 2 respectively.
  • Window Modality & Drawer Question

    Unsolved
    6
    0 Votes
    6 Posts
    608 Views
    M
    Try to add Qt::Window to setParent as here: mAssistant = new ManualAssistant(); mAssistant->setModal(true); mAssistant->setParent(parent, Qt::Window); mAssistant->exec();
  • QTWidgets Stylesheet

    Unsolved
    2
    0 Votes
    2 Posts
    170 Views
    Axel SpoerlA
    @obelisk79 Difficult to make guesses in the dark: Which Qt Version & platform is used here? How are the icons populated? Anything special about their size? Can you show the relevant code?
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    23 Views
  • new Widget not following parent window size

    Unsolved
    2
    0 Votes
    2 Posts
    171 Views
    Christian EhrlicherC
    You have to add your widget to the parents layout.
  • QT Desktop Database Application and Remote Connection

    Unsolved
    4
    0 Votes
    4 Posts
    420 Views
    jsulmJ
    @Radio1985 said in QT Desktop Database Application and Remote Connection: When you say a database server did you mean a cloud base database? You wrote: "the data stored in the database should be able to access from a different location and different network". That means that you need a server which can be accessed from all locations where the access is required. Whether it is a traditional database server or cloud is again something you need to decide. Cloud would require less maintenance on your side I guess, but then you have to trust the cloud provider. If your data has a well defined structure and you need the possibility to query it then I would recommend SQL.
  • Add/Delete Multiple Widgets to QGridLayout Programmatically

    Unsolved
    13
    0 Votes
    13 Posts
    1k Views
    R
    @jsulm @JonB , Thanks for the suggestions. Yeah I was able to learn from ui_...h file how things are implemented. I removed all the alignments in the first row. Then I set my dynamic widget parameter dimensions and alignment according to the first row. Thanks!
  • The text drawn by paint scrolls with the scroll bar

    Unsolved
    2
    0 Votes
    2 Posts
    200 Views
    jsulmJ
    @KAMblLLl said in The text drawn by paint scrolls with the scroll bar: There are some text elements that must have highlighted word inside You could also use https://doc.qt.io/qt-6/qsyntaxhighlighter.html
  • Dynamically creating a vector of push buttons to a grid layout in Qt C++

    Unsolved
    8
    0 Votes
    8 Posts
    960 Views
    SGaistS
    You can simply iterate your vector and then do the connections you want on the current object in the iteration loop.
  • Single pro file for qt5 + qt6

    Unsolved
    2
    0 Votes
    2 Posts
    211 Views
    SGaistS
    Hi, A single qmake ? No, a single .pro file ? Yes, check the ones generated by Qt Creator. There's a test to check whether you are using Qt 4 or Qt 5 (or at least there was)
  • QT process excel

    Unsolved
    3
    0 Votes
    3 Posts
    219 Views
    hskoglundH
    Hi try https://github.com/QtExcel/QXlsx
  • center checkbox in QTableWidgetItem

    Unsolved
    2
    0 Votes
    2 Posts
    299 Views
    Christian EhrlicherC
    That's currently the only way: https://wiki.qt.io/Center_a_QCheckBox_or_Decoration_in_an_Itemview