Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Supported Windows versions

    Unsolved
    1
    0 Votes
    1 Posts
    197 Views
    No one has replied
  • VS Tools how to use a qt class library

    Unsolved
    4
    0 Votes
    4 Posts
    780 Views
    JonBJ
    @astoffregen Looks to me like you're not linking against TestLib.lib.
  • Please help me get googlemaps plugin to work with Python

    Unsolved
    6
    0 Votes
    6 Posts
    370 Views
    M
    @jsulm Working on Windows really frustrates me.. Everywhere you turn you need something proprietary. I'm used to Linux.
  • QTextDocumentWriter does not work transferring to table cells when saving

    Unsolved qt5.15.2
    1
    0 Votes
    1 Posts
    201 Views
    No one has replied
  • How to use the connect

    Unsolved thread connect
    3
    0 Votes
    3 Posts
    703 Views
    J.HilkJ
    @JuanNunez said in How to use the connect: unresolved overloaded function type addItem has multiple overloads and the connect cont resolve which one to use. https://doc.qt.io/qt-5/qtglobal.html#qOverload also don't use threads. I'm 90% sure you don't know what your doing, and don't need them in the first place
  • How can I insert .c file into

    Unsolved
    2
    0 Votes
    2 Posts
    164 Views
    J.HilkJ
    @icebergenergy like you would any c++ file, its just a different ending. the Editor doesn't care
  • Adding padding to QSlider does not work on Fusion style

    Unsolved
    5
    0 Votes
    5 Posts
    998 Views
    W
    Hi @SGaist We're working in pure Python, so rebuilding the C++ code is going to take a lot of time. I'm happy to report it as a bug though, thanks for the link.
  • How to center mainWindow on the screen?

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    S
    Well, there is one annoying thing that might prevent this: It is not possible to center the widget on the screen from within the constructor directly. Within the constructor the widget does not have a size, yet. Qt only gives proper values for the size after showing the widget. Only then will the layout geometry be computed. Calling show itself also does not show the widget immediately because several calls to QWidget::update() are collected into a single repaint. What we do (on Windows) is to queue another slot call into the event loop which centers the widget. The order of the show event and of our center-slot seem to work out. This is something to consider apart from other problems you might have. In the same vein I am not sure if a move call does anything when done before the widget is actually shown on the screen. PS: One thought to solve the ordering problem: connect a slot to the showEvent of the widget to center it on the first show. Maybe this will work.
  • Increasing the signal-slot scheduling time.

    Unsolved
    7
    0 Votes
    7 Posts
    555 Views
    J
    @Kent-Dorfman @Kent-Dorfman said in Increasing the signal-slot scheduling time.: What exactly do you think that you are you metering in the time between signalling and dispatching? I want to check the how much time is taking the dispatching the signal. @Kent-Dorfman said in Increasing the signal-slot scheduling time.: You're not considering that you are running on a time shared system with a scheduler that is running other jobs too. I have commented the update() function in my QOpenGLWidget (i.e not scheduling the paintEvent()), in this case the time between signaling and dispatching is 0.2 to 0.4 ms only. But when I invoked the update() in my QOpenGLWidget, the time between signaling and dispatching is increasing overtime. Hence I want to know exact reason to increasing the time.
  • writeTextElement() of QXmlStreamWriter crashed when writting the content of a big file

    Unsolved
    10
    0 Votes
    10 Posts
    625 Views
    jsulmJ
    @MNGL said in writeTextElement() of QXmlStreamWriter crashed when writting the content of a big file: how should I control it to write a chunk of the xml content to a buffer or By reading the content of the files in small chunks as already explained and comparing these chunks.
  • How to make full screen

    Solved
    11
    0 Votes
    11 Posts
    6k Views
    serkan_trS
    @JoeCFD I made the comments line everywhere, I only made the part you said active, but it is still full screen, the vindow and application parts are visible at the bottom. ApplicationWindow { id: mainWindow // minimumWidth: ScreenTools.isMobile ? Screen.width : Math.min(ScreenTools.defaultFontPixelWidth * 100, Screen.width) // minimumHeight: ScreenTools.isMobile ? Screen.height : Math.min(ScreenTools.defaultFontPixelWidth * 50, Screen.height) // visible: true visibility: Window.FullScreen // visibility: Window.FullScreen // visibility: mainWindow.FullScreen // Component.onCompleted: { // console.log((ScreenTools.defaultFontPixelWidth * 100).toString(),"--",Screen.width.toString(),"\n\n") // //-- Full screen on mobile or tiny screens //// mainWindow.minimumWidth = Math.min(1000,1000/*ScreenTools.defaultFontPixelWidth * 100, Screen.width*/) //// mainWindow.showFullScreen() //// console.log("\n\nsignal\n\n") // if (!ScreenTools.isMobile || Screen.height / ScreenTools.realPixelDensity < 120 /*|| 1 === 1*/) { // console.log("APP: true") //// mainWindow.FullScreen // mainWindow.showFullScreen() // } else { // console.log("APP: false") // width = ScreenTools.isMobile ? Screen.width : Math.min(250 * Screen.pixelDensity, Screen.width) // height = ScreenTools.isMobile ? Screen.height : Math.min(150 * Screen.pixelDensity, Screen.height) //// mainWindow.showFullScreen() // } // // Start the sequence of first run prompt(s) // firstRunPromptManager.nextPrompt() // }
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • How to make WA_TranslucentBackground work on Windows without using FramelessWindowHint?

    Unsolved
    1
    0 Votes
    1 Posts
    826 Views
    No one has replied
  • MainWindow is not taking the menubar's size into account

    Unsolved
    3
    0 Votes
    3 Posts
    217 Views
    M
    @toara said in MainWindow is not taking the menubar's size into account: Game game(&mainWindow); Should crash on exit ... Use new Game() instead. how can I make it so that QMainWindow resize itself to the "correct" width and height when a menubar is present? Put Game in a layout and set it a fixed size: game->setFixedSize(QSize(768, 550)); mainWindow.show(); // set the mainwindow a fixed size as well if you want to prevent resizing //mainWindow.setFixedSize(mainWindow.size()); qDebug()<<game->size(); // should be 768x550
  • How to use SVG

    Unsolved svg icon widget
    33
    0 Votes
    33 Posts
    21k Views
    SMEasyS
    As explained here, QSvgWidget has been moved to a new module called QtSvgWidgets. According to the documentation: Header: #include <QSvgWidget> CMake: find_package(Qt6 REQUIRED COMPONENTS SvgWidgets) target_link_libraries(mytarget PRIVATE Qt6::SvgWidgets) qmake: QT += svgwidgets Inherits: QWidget So in Qt6 the solution is following: QT += svgwidgets
  • Include what you use

    Solved
    5
    0 Votes
    5 Posts
    601 Views
    P
    @Christian-Ehrlicher Hello, indeed, I commented lines related to iwyu in CMakeList and now it compile. Sorry my question was stupid. Thanks a lot for your help. Pascal
  • QGraphicsDropShadowEffect the shadow scalable is not correct in the scene

    Unsolved
    3
    0 Votes
    3 Posts
    300 Views
    QtFCQ
    @JonB said in QGraphicsDropShadowEffect the shadow scalable is not correct in the scene: @QtFC If you are hoping your comments will be acted on, are you aware that this is a user forum and is not read by TQtC company/developers? I suspect that... https://bugreports.qt.io/browse/QTBUG-111108
  • Qprocess in real time in longer process

    Unsolved
    10
    0 Votes
    10 Posts
    1k Views
    Kent-DorfmanK
    https://www.informit.com/articles/article.aspx?p=1405549&seqNum=5 It is from Qt4 but the I believe the concepts are still relevant. as for git clone command...will depend on how it is written? is output to stdout or stderr? has the author embedded ANSI output controls in the output strings? and for what it's worth, the answer to your question/problem is in the manpage for git clone.
  • Exit code 0xC0000135 at startup when I declare a QChart

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    Christian EhrlicherC
    @Evoxz said in Exit code 0xC0000135 at startup when I declare a QChart: I'm wondering : aren't the dlls managed by CMake No, how should cmake configure your PATH env var? CMake is a build system, not a deubgger or anything else.
  • Check if machine has access to the internet

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    Cobra91151C
    Hello! You can check the Internet connection using QTcpSocket (https://doc.qt.io/qt-6/qtcpsocket.html). Please, check out my code below: Code: bool checkInternetConnection() { bool isConnected = false; QTcpSocket checkConnectionSocket; checkConnectionSocket.connectToHost("google.com", 443); // 443 for HTTPS or use Port 80 for HTTP checkConnectionSocket.waitForConnected(2000); if (checkConnectionSocket.state() == QTcpSocket::ConnectedState) { isConnected = true; } checkConnectionSocket.close(); return isConnected; } Happy coding!