Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Window maximised state not retained over close

    Solved
    2
    0 Votes
    2 Posts
    180 Views
    Pl45m4P
    @Perdrix What OS are you using? Note this from here: On X11, this might not work because an invisible window does not have a frame yet. The window manager will decorate the window later. When this happens, the window shifts towards the bottom/right corner of the screen depending on the size of the decoration frame. Although X provides a way to avoid this shift, some window managers fail to implement this feature. In addion, it seems that there are a lot of bugs when trying to restore geometry from settings. There are also some workarounds https://stackoverflow.com/questions/15111788/qwidgetsave-restoregeometry-loses-window-size-if-maximized-bug-or-feature https://stackoverflow.com/questions/44005852/qdockwidgetrestoregeometry-not-working-correctly-when-qmainwindow-is-maximized
  • drawRect not show left and top border line

    Unsolved paintevent layout drawrect
    4
    0 Votes
    4 Posts
    1k Views
    Christian EhrlicherC
    You should create a bug report about this with a minimal, compilable example. I took a short look at the code but can't see any obvious here.
  • Is there a signal that triggers right after .exec() is called

    Unsolved
    6
    0 Votes
    6 Posts
    560 Views
    S
    Even though a 0 delay timer does get called immediately, I am not entirely sure how that will interact with the splash screen. The splash screen needs to run in the main thread and might be blocked by you loading the config files (depends how long loading the config files takes if this will be an issue). Though, a 0 delay timer will execute when the event loop is idle. This means that at least the show() for the splash screen will be executed before loading the config files. However, if the user switches back and forth between other applications and the splash screen, your app might be identified as hanging and not update the splash screen (maybe leaving a white rectangle).
  • Why export excel in windows10 normal, in windows7 export will crash?

    Solved
    24
    0 Votes
    24 Posts
    4k Views
    M
    @duncan98 At the frist make sure that your office excel is activated then use CoInitialize(nullptr); befire taking export. this function can find in #include <objbase.h>
  • Problem with Qt6 on MacOS 14.0 (Somona)

    Solved bug problem qt6 macos 14.0 osx somona
    13
    0 Votes
    13 Posts
    2k Views
    E
    @hskoglund Thank you, that solution solved my issue. A note for anybody else: I was running 6.6.0-rc and thought that it would have the patch. Once I downloaded 6.5.2 and used that kit it worked.
  • Porting Graphics App from wxWidgets

    Unsolved
    2
    0 Votes
    2 Posts
    312 Views
    Pl45m4P
    @Mike-Moreton said in Porting Graphics App from wxWidgets: So I'm pretty new to all this Qt stuff. I think I can handle all the widgets based UI, but I'd really appreciate any pointers on where I should be looking for the graphics side of things. There seem so many options! Start here: https://doc.qt.io/qt-6/graphicsview.html check out the QGraphicsView examples: https://doc.qt.io/qt-6/examples-graphicsview.html And this one for painting on Widgets: https://doc.qt.io/qt-6/qtwidgets-widgets-scribble-example.html
  • What does QMultiHash::insert(key, value) return?

    Solved
    8
    0 Votes
    8 Posts
    471 Views
    Christian EhrlicherC
    https://bugreports.qt.io/browse/QTBUG-117757
  • 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
    498 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
    681 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
    312 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
    283 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
    13k 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
    341 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
    598 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
    168 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
    169 Views
    Christian EhrlicherC
    You have to add your widget to the parents layout.