Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Latest Qt, ubuntu, C++ based app, could not using arrows and scroll

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    jsulmJ
    @JacobNovitsky said in Latest Qt, ubuntu, C++ based app, could not using arrows and scroll: Qt as IDE Qt isn't an IDE. As @JonB pointed out you need running Qt event loop to be able to use signals/slots. This is very basic Qt. To start Qt event loop you need to call https://doc.qt.io/qt-6/qapplication.html#exec like in any proper Qt application. See https://doc.qt.io/qt-6/qapplication.html for an example.
  • Drawing a shining effect animation

    Unsolved
    20
    2 Votes
    20 Posts
    2k Views
    Pl45m4P
    @Ylvy said in Drawing a shining effect animation: I had asked for the code you used on your gif nothing more, doesn't matter what you modified. tbh, I didn't modified that much... I changed the coodinates as I already told you, changed the place in my code where I actually resize (it will already work when you put the resize before setAnimation. No dynamic resizing but for a static button) and played around with the "size" ( = stretch) of the gradient... You can stretch the gradient by adding multiples of your width and height to the start/end position. There is no "one" version of code. Cant remember the size of the button, but IIRC I doubled the size by using 4 instead of 2. So instead of endAnimation->setStartValue(QPointF(0, height())); endAnimation->setEndValue(QPointF(2 * width(), - height())); I use for example: endAnimation->setStartValue(QPointF(0, height() * 2)); endAnimation->setEndValue(QPointF(2 * 2 * width(), - height() * 2));
  • How to dock the application output window to the right sidebar?

    Unsolved
    5
    1 Votes
    5 Posts
    611 Views
    Pl45m4P
    @Athem said in How to dock the application output window to the right sidebar?: Updated to QT Creator 10.0.2 and still cannot dock the application output to the right. Mh, tested it myself and really doesn't seem to work :( Hopefully in a future release... Or you contribute and provide the code + idea for that (grant option to include all output panels from the bottom in the left or right side bar) Maybe it gets patched :)
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    21 Views
    No one has replied
  • First call to QIcon::pixmap takes 180 milliseconds

    Unsolved
    7
    0 Votes
    7 Posts
    582 Views
    Youda008Y
    It seems to be DLL loading. Apparently when Windows is asked to provide the file icons, it starts loading a crapton of DLLs related to icons and thumbnails, and if the OS or drive is not in the best shape, it takes long time. [image: cbc9dde8-64e0-4a87-afd7-05313fd6a4c9.png]
  • Different behaviour of QT6 when changing camera resolution on Windows/Linux

    Unsolved
    4
    0 Votes
    4 Posts
    473 Views
    SGaistS
    Sounds like either you found an inconsistent behaviour or the documentation is missing information. I would suggest to check the bug report system to see if it's something known and if not, please open an issue about it.
  • About creating qsqlmysql.dll

    Unsolved
    2
    0 Votes
    2 Posts
    272 Views
    Christian EhrlicherC
    Do not modify any pro file but follow the official documentation.
  • dependent 'C:\vcpkg\installed\x64-windows\include\proj_api.h' does not exist.

    Unsolved
    5
    0 Votes
    5 Posts
    575 Views
    H
    @Chris-Kawa Thanks for this, i saw this page, but with this, i have to put all my lib in this file ? I'm not sure to understand how it works.
  • Error including tesseract Windows 10

    Unsolved tesseract c++ include path headerfile
    4
    0 Votes
    4 Posts
    2k Views
    jsulmJ
    @MEsc said in Error including tesseract Windows 10: ./configure -> does not work Yes, because you're on Windows. Maybe https://tesseract-ocr.github.io/tessdoc/Compiling.html#windows can help.
  • 0 Votes
    7 Posts
    527 Views
    D
    @JonB ok jon thanks
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • QChart, QChartView, large line series

    Unsolved
    2
    0 Votes
    2 Posts
    208 Views
    PerdrixP
    @manuelgrubbs Yes, but what controls if/when they appear?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Looks like your connection...

    Unsolved
    2
    0 Votes
    2 Posts
    172 Views
    JonBJ
    @Perdrix Has always happened from time to time.
  • Widget weird hover behavior

    Unsolved
    3
    0 Votes
    3 Posts
    509 Views
    D
    @Pl45m4 Well, I can certainly fix the show and hide issue by listening to moveEvent and updating the widget manually. But how to fix the stylesheet one? Let's say I have a stylesheet like this: #CustomWidget:hover { background: red; } As you can see in the gif, the hover style is not applied until I move the cursor. Is there a way to tell the widget to apply this hover style? I am doing self.update() but it's doesn't work. I am aware that I can do something like this, but I think it is kinda unintuitive. def enterEvent(self, e) { self.setStyleSheet("hover style") } def leaveEvent(self, e) { self.setStyleSheet("normal style") } Is there any better solution?
  • QAxObject can not read from source.qrc

    Unsolved
    3
    0 Votes
    3 Posts
    184 Views
    JonBJ
    @wuzhouquan said in QAxObject can not read from source.qrc: documents->dynamicCall("Add (QString)", ":/template/reportTemplate.docx"); Do you have any evidence that documents->dynamicCall() can accept a Qt resource path? Remember, resource paths do not "exist" outside Qt, only Qt code can access them. I doubt Qt deals with this passing it to QAxObject code? @Christian-Ehrlicher's post has crossed with mine. You need to extract that resource to a physical, external file to make it acceptable.
  • Why is the style so strange?

    Solved
    4
    0 Votes
    4 Posts
    397 Views
    J
    @Chris-Kawa Thank you so much.
  • how to protect my code in qt

    Unsolved
    10
    0 Votes
    10 Posts
    2k Views
    Kent-DorfmanK
    @mjsmithers said in how to protect my code in qt: How does the 'strip' utility relate or compare to the above suggestions? Apples and oranges. strip removes elements that are unreferenced and symbol lookups. It won't touch "used/referenced" char literal arrays.
  • There is an smart and safe pointer to a QString object?

    Solved
    19
    0 Votes
    19 Posts
    2k Views
    Kent-DorfmanK
    Sometimes you need to throw out the baby with the bath water.
  • Updating a Chart when appending to a Line Series.

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    JonBJ
    @Perdrix said in Updating a Chart when appending to a Line Series.: The only way I have (so far) managed to get a Chart to refresh when adding a new point is to remove the current line series (without deleting it), append the new point to the series, and re-add the line series. I have not used QCharts(!), but that would sound very surprising. You would not be able to e.g. append new points over time and have the chart display them, which does not sound right. I note that, for example, QXYSeries has signals void QXYSeries::pointReplaced(int index) or void QXYSeries::pointsReplaced() (and similarly for adding or removing points). (Note these are signals on the series, not on the whole chart.) One/I would have thought this would get used to cause the chart view to be refreshed? You might attach your own slots to some of these to check they are indeed being emitted. I presume QChartView is supposed to hook onto those signals itself. I have come across How to update/redraw QChart after data is added to QLineSeries? Appending a value to QLineSeries using the operator << or the append method should repaint the graph. If it does not happen form some reason, you could trying calling the repaint method on the QChartView. and void QWidget::repaint() Repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the widget is hidden. We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances update() is better, as it permits Qt to optimize for speed and minimize flicker. Also read Qt Chart is not updated after updating the series in this forum, where the OP says just as you do. And at the end the repsonder says: ChartView should handle redraw and everything for you. Finally I also encountered Updating QLineSeries in Chart doesnt work at all. A suggestion there is that it is a axes issue, do you use something like createDefaultAxes()? I think the "point" here [excuse the pun!] is that if the new point now lies outside of the current axes range it might be regarded as "off screen" and so need some extra work to get the axes rescaled to view. I cannot comment on setPointConfiguration(), that is a call introduced in Qt6.x so relatively new. P.S. See also https://forum.qt.io/topic/145986/qchart-line-series-not-shown/3.