Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • QDialog::setGeometry() on Windows 10 / Linux

    Solved
    5
    0 Votes
    5 Posts
    568 Views
    R
    @Pl45m4 and @mpergand : Thanks! This was the solution -- a combination of both suggestions: // as above, then: pfcb->show(); pfcb->setFixedHeight(pfcb->minimumHeight()); // etc.
  • core5compat not found on macOS

    Solved
    5
    0 Votes
    5 Posts
    3k Views
    C
    @Bonnie Thank you! It is a so bad mistake of mine that I should get ashamed. However, this completely solves my issue. Thank again
  • 0 Votes
    6 Posts
    3k Views
    W
    @JonB I moved my code into QGraphicsView::drawBackground() as you recommended, it works nicely. Thanks a lot!
  • Wayland compositor not setting focus for TextInputManager

    Unsolved
    1
    0 Votes
    1 Posts
    159 Views
    No one has replied
  • How to use a signal on QML side

    Solved
    1
    0 Votes
    1 Posts
    122 Views
    No one has replied
  • Building for Linux and Windows

    Unsolved
    8
    0 Votes
    8 Posts
    615 Views
    andrA
    @SimonSchroeder said in Building for Linux and Windows: Qt Creator for qmake projects will write a Makefile to the main folder both on Windows and Linux There is no difference between qmake and cmake here. It will put the Makefile in you build directory, so if you have different build dirs for the Linux and Windows builds that just works.
  • Qt::WindowStaysOnTopHint inconsistent behavior in RDP sessions on Windows 10

    Solved
    2
    0 Votes
    2 Posts
    163 Views
    deisikD
    It turns out that the real culprit is another application (on top of which my widget should be) which tries to stay above all other windows
  • QTableView merges cells

    Unsolved
    2
    0 Votes
    2 Posts
    233 Views
    JonBJ
    @Nan-Feng What do you mean other than void QTableView::setSpan(int row, int column, int rowSpanCount, int columnSpanCount)?
  • If Statement with QTime

    Solved
    13
    0 Votes
    13 Posts
    959 Views
    JonBJ
    @jsulm said in If Statement with QTime: Do you remember the "Port Qt to Rust" thread? :-) That was what I had in mind.... Maybe that would enforce half the C++ rules, without needing to impose an equal number of new ones for Rust?
  • How remove extra spaces from character using QFontMetrics?

    Unsolved
    7
    0 Votes
    7 Posts
    716 Views
    S
    @zabitqt said in How remove extra spaces from character using QFontMetrics?: If I draw Hello I see it correctly but if I draw character per character I see a space between character. This is because the font has embedded information how to adjust the distance between specific neighboring characters. If you draw them separately, this information is lost for the font renderer. Here is the definition of kerning from Wikipedia: In typography, kerning is the process of adjusting the spacing between characters in a proportional font, usually to achieve a visually pleasing result. Kerning adjusts the space between individual letterforms. I am not sure if Qt provides any way to get to this kind of information. You can disable kerning (for a whole word and not individual letters) and see if you get the same result when you are drawing the letters separately. If this is the case you know that you need to further research kerning.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • How to create border around modal window

    Unsolved
    3
    0 Votes
    3 Posts
    308 Views
    jsulmJ
    @masa4 It would be new to me that layouts can have styles. Layouts are not widgets and have no graphical representation. You need to set stylesheet on your widget.
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    27 Views
  • QStirng memory allocation and free

    Solved qstring memory allocati dynamic allocat
    6
    0 Votes
    6 Posts
    2k Views
    L
    @ChrisW67 thank you.
  • QWidget::mousePressEvent() not called

    Unsolved
    12
    0 Votes
    12 Posts
    3k Views
    N
    @jeremy_k Adding this QRectF TreeViewNode::boundingRect() const { return QRectF(-25, -25, 50, 50); } fixed it instantly.. such a silly mistake, it's almost as if I started learning about Qt last week.. (it's true). What can I say, thank you so much to everyone for your time and your suggestions, I'll make sure to remove m_scene and use scene() as well and keep learning more in detail about the classes I'm using. Thank you!
  • Setting limit size to vector and overwriting the oldest value when limit reached

    Unsolved
    9
    0 Votes
    9 Posts
    783 Views
    Kent-DorfmanK
    @JonB said in Setting limit size to vector and overwriting the oldest value when limit reached: I suggested earlier you can avoid this if you wish to be efficient. You would need to be able to read the oldest sample you are overwriting/discarding. MUST...FIGHT...URGE...TO...RESPOND!...but you read my mind. LOL
  • This topic is deleted!

    Unsolved
    4
    0 Votes
    4 Posts
    31 Views
  • MacOs: How to show a Folder Menu PopUp in window title bar

    Unsolved
    3
    0 Votes
    3 Posts
    436 Views
    S
    @mpergand Thanks - this works as expected for the main Window. I think it should also work for each Tab in a QMdiSubWindow - but if i set this for such a window it has no effect.
  • Crash in QMenu::exec() / QMenu::popup()

    Unsolved
    6
    0 Votes
    6 Posts
    764 Views
    Axel SpoerlA
    @NextSaturday It's indeed the paint event that ultimately causes the crash. It is consumed by a widget inheriting from QAbstractButton. That widget has a dangling d-pointer. It's theoretically possible but pretty unlikely, that it's not yet properly constructed. Unlikely because it already receives a mouse event. It's more likely on the way to destruction and still receiving a mouse event. The painting as such is doomed to fail, but it already fails when trying to obtain the d-pointer, so the crash happens before any painting is done. Sharing all the code in question would help to get to the bottom of it.
  • 5.15.12 ?

    Unsolved
    2
    0 Votes
    2 Posts
    211 Views
    Christian EhrlicherC
    If you've a commercial license then you will get 15.15.12, otherwise you have to stay with 5.15.2 when you want a pre-built binary package or 5.15.8 when you want to compile Qt on your own.