Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • How can I change the pointSize of a QLabel?

    Unsolved
    2
    0 Votes
    2 Posts
    216 Views
    JonBJ
    @Z3PHYR This attempts to animate/increment a QFont object, which of course makes no sense --- what could it mean/how could it be achieved? You want to animate the font size, which is a number. The types which you can animate are listed in https://doc.qt.io/qt-6/qvariantanimation.html#details. Have a look at https://stackoverflow.com/a/68131633/489865, and translate to C++. As the guy there says: There is no property for the font size, though, so there are two possibilities: create a custom property (by using the pyqtProperty decorator in PyQt); use a QVariantAnimation, which is not bound to any property; Pick whichever way you prefer.
  • QWebEngineview does not let debugger exit

    Unsolved
    2
    0 Votes
    2 Posts
    166 Views
    No one has replied
  • Issue loading and displaying STL file with Qt3D

    Solved
    2
    0 Votes
    2 Posts
    328 Views
    P
    So @karlphillip on StackOverflow helped me resolve this issue. It turned out the issue had to do with scaling the STL mesh so that it became visible. I had to scale it down to < .01 and there it was. I hope this helps someone else.
  • The function window()->windowHandle(); always returns nullptr in my custom widget.

    Solved
    5
    0 Votes
    5 Posts
    467 Views
    JonBJ
    @Paul-Xu If it works (I would have put it after the QWidget::showEvent(event);) then it's fine, what is not "elegant" about it?
  • scp does download all files when embeded in a QProcess

    Solved
    4
    0 Votes
    4 Posts
    464 Views
    O
    Thanks for your advices, I have already implemented them. Actually, my problem was that all files where not yet created in the remoted folder before I start the scp command.
  • What kind of signals can be emitted in GUI applications before event loop starts

    Unsolved
    16
    0 Votes
    16 Posts
    2k Views
    JonBJ
    @abhic As @SimonSchroeder says, not sure why it should be an issue. But if it really bothers you, don't forget you could delay calling the connect()s/attaching your views to models etc. till the event loop has started by doing them in a function on a QTimer::singleShot(0) which you set off just before the app.exec().
  • In need of a 64-bit unsigned QSpinBox (to fit large numbers like pointers, etc)

    Unsolved
    14
    0 Votes
    14 Posts
    2k Views
    GaoboG
    @JonB I'm getting some errors when editing the link🌚 Thanks for the correction.
  • Any solutions on Windows terminals?

    Unsolved winterm-emulate qwidget activex-control
    7
    0 Votes
    7 Posts
    921 Views
    SGaistS
    Hi, KDE's Konsole also supports Windows, it might be easier to integrate it in your project.
  • QVideoFrame::map() only allows one call?

    Unsolved
    6
    0 Votes
    6 Posts
    560 Views
    C
    Still cannot post code "Post content was flagged as spam by Akismet.com" The code in the image gives me --- 1.1: map true isMapped true isWritable true --- 1.2: map true isMapped false isWritable false --- 2.0: map true isMapped true isWritable false --- 2.1: map false isMapped true isWritable false --- 2:2 map false isMapped false isWritable false Without any sleep() it does indeed work, but I mean in reality there is some delay between frames in a video, right? I feel there is a bug somewhere. [image: ee58c7dc-25af-4b1b-a392-9ae33ccea846.png]
  • QSettings Language

    Solved
    14
    0 Votes
    14 Posts
    1k Views
    PerdrixP
    @JonB Nothing to do with QSettings. It was a Unix locale issue. It turns out that the QSettings stuff was left there by the original developer of that code to allow testing without switching the language of his system. It mightily confused me ...
  • Modbus TCP Client Holding Registers Address on HMI

    Unsolved
    2
    0 Votes
    2 Posts
    251 Views
    aha_1980A
    Hi @Zeshan, at first you should clarify if you want to use Modbus TCP or MQTT, as these are two completely different protocols. Regards
  • Use Qt APIs with Swift 5.9 and the new C++ interoperability

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    B
    Here the examples of how to use CPP in Swift with XCode projects.
  • Image zoom widget using QGraphicsView

    Unsolved
    2
    0 Votes
    2 Posts
    389 Views
    R
    --bump--
  • QRect width and height confuses me

    Unsolved
    3
    0 Votes
    3 Posts
    280 Views
    Q
    @Christian-Ehrlicher thanks for replying. I've seen the document, but i don't understand why it's rendered like that. if i need a big rect contains a small image, did i should just do like this: QRect big(0,0,152,152); QRect small(1,1,150,150); painter.setPen(QPen(Qt::red,1)); painter.drawRect(0,0,big.width-1,big.height-1); painter.drawImage(1,1,small.width-1,small.height-1); // or // painter.drawImage(1,1,small.width,small.height); ??? width and height for drawRect and drawImage is not the same meaning? right?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • Widgets doesn't fit to content after hiding

    12
    0 Votes
    12 Posts
    9k Views
    P
    I tried all sorts of things as well, searched all over, and eventually found this post https://stackoverflow.com/questions/68303194/why-adjustsize-doesnt-resize-mainwindow-in-qt In the end all that I needed to do was ui.centralWidget->adjustSize(); adjustSize(); When a widget was hidden, the window would resize to remove the unused space. When the widget was unhidden, the window and layout would resize to make space for the widget. This was done with Qt 6.5.5, but I would guess this would work with earlier versions as well.
  • Event filter for QtabWidget (PySide6)

    Solved
    3
    0 Votes
    3 Posts
    723 Views
    E
    Thank you so much ,it works that way ,on the other hand ,i dont limit the values because it is needed that way
  • Remove space between QChart in grid layout

    Unsolved
    1
    0 Votes
    1 Posts
    168 Views
    No one has replied
  • 0 Votes
    4 Posts
    443 Views
    JonBJ
    @nicker-player I know nothing about QML or QResource. But since you are using bool QResource::registerResource(const uchar *rccData, const QString &mapRoot = QString()) overload it tells you Warning: The data must remain valid throughout the life of any QFile that may reference the resource data. That means you cannot afford to delete the newed array at all, so long as it may be referenced, does it not? You would need to save the newed pointer and only delete it after you no longer need the resource. I only say this from the description of that overload. If you could use the bool QResource::registerResource(const QString &rccFileName, const QString &mapRoot = QString()) overload instead you would not have this issue --- presumably because that one keeps the file open and gets the data from there instead of requiring the data to be sitting in permanent memory?
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    61 Views