Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • localized translated autoname function using QDate and QTime or QDateTime

    Solved
    5
    0 Votes
    5 Posts
    466 Views
    JonBJ
    @Circuits said in localized translated autoname function using QDate and QTime or QDateTime: So QDateTime does not provide the ability to produce: YYYY/MM/DD/HHMMSS? In addition to what @VRonin wrote. It certainly does. If you clicked the link I gave you would see it recognises many such patterns, that's the whole point. The question is precisely which/what you are wanting.
  • Using QTableWidget from other function avoid segfault

    Solved
    4
    0 Votes
    4 Posts
    327 Views
    B
    Oh, my bad. Thank you ! Now working as expected. @JoeCFD said in Using QTableWidget from other function avoid segfault: @VRonin His warning level may be too low or the warning is simply ignored. Sometimes hungary notation may help a bit. Ok, thank you !
  • Pyinstaller exe freezing

    Unsolved
    3
    0 Votes
    3 Posts
    404 Views
    VRoninV
    @JonB I suspect OP's problem is deploying an app compiled using Qt for Python. The usual "use windeployqt" answer would apply but I don't know the specifics of a python program though
  • How can I show context menu (right-click) only for a specific View?

    Solved
    18
    0 Votes
    18 Posts
    4k Views
    LoquatL
    @Cobra91151 That's brilliant! Thanks very much!
  • Qt Application loading Qt DLLs from OneDrive installation

    Solved
    18
    0 Votes
    18 Posts
    3k Views
    JKSHJ
    @Bob64 That sounds like quite a hairy issue. I'm glad you found a way to resolve it reliably. Thank you for sharing your findings with us!
  • Why QScopedPointer<QJsonArray> ?

    Solved
    3
    0 Votes
    3 Posts
    322 Views
    SPlattenS
    @VRonin , thank you, thats what I thought, just thought it would be good to get a second opinion.
  • Customize QDoubleSpinBox text align with CSS

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    JonBJ
    @Bert59 A QSpinBox has an internal QLineEdit child for the number text. I won't lie to you, I have had trouble accessing that fully, and reported a bug, but it never got addressed. But I did successfully change the text alignment (mine was from code, not stylesheet, for this). That is what you will need to set the text-align on. Try it from stylesheet rule (QDoubleSpinBox.QLineEdit or whatever the docs say the syntax is a for a child, I can't remember?), though that may be what I found did not work right. Or to verify my claim set the stylesheet directly from code on spinBox->lineEdit() to check it works. Note that method is protected, to access you either need to sub-class or use spinBox->findChild<QLineEdit *>().
  • How can I access Model index via contextMenuEvent?

    Solved
    8
    0 Votes
    8 Posts
    645 Views
    VRoninV
    @Loquat said in How can I access Model index via contextMenuEvent?: is that all correct? Yes
  • 0 Votes
    3 Posts
    1k Views
    BeaverShallBurnB
    Hi, @J-Hilk! Looks like i found desired method in QModbusDataUnit class docs. Don't know how i missed it being mentioned in List of All Members for QModbusRtuSerialMaster. I guess digging into Qt docs about Modbus was a proper way to solve this :) QModbusDataUnit::QModbusDataUnit(QModbusDataUnit::RegisterType type, int address, const QVector<quint16> &data) In my case this will be: QModbusDataUnit input(QModbusDataUnit::InputRegisters, 3001, data); Thanks for joining my journey!
  • Qprinter scaled

    Unsolved
    3
    0 Votes
    3 Posts
    355 Views
    I
    @eyllanesc [image: 031bcaf4-f4d8-4c76-8775-25281823cfbc.png] printer->setPageMargins(3, 3, 3, 3, QPrinter::Millimeter); What's wrong with the margin that doesn't apply to the preview?
  • QGraphicsSvg

    Unsolved
    6
    0 Votes
    6 Posts
    548 Views
    R
    @JKSH Thanks, I will try this. I m new to QT so finding it difficult. You are right need to organize SVG file as per requirement.
  • QSerialPortInfo::availablePorts() not calling availablePortsByFiltersOfDevices()

    Solved
    11
    0 Votes
    11 Posts
    2k Views
    S
    @ChrisW67 Indeed the fasted way is just to try and see. I did not have access to the environment to try it when I posted my last question, so I figured I'd ask about identifying existence of driver beforehand just in case QSerialPort doesn't work when I do try. But luckily it worked. I did learn a lot and have much to learn, thanks for all the help.
  • How does Qt call Swift code?

    Solved
    7
    0 Votes
    7 Posts
    999 Views
    S
    @kameshbhai32 Thank you.
  • How to customize the Window borders when using Qt::CustomizeWindowHint

    Unsolved
    1
    1 Votes
    1 Posts
    467 Views
    No one has replied
  • Hover Enter of Widget Moved Under Mouse

    Unsolved
    3
    0 Votes
    3 Posts
    510 Views
    Q
    The goal is to have the hover style applied correctly regardless of how the widget wound up under the mouse. One example for how the widgets get moved is the window being maximized then restored. If the window is restored and the widget is moved under the mouse as a result of the restore, the hover style isn't applied. The HoverLeave event has the inverse of the issue, where if the widget is moved away it doesn't receive a HoverLeave event. This is mostly an issue with my custom title bar, where if I maximize then restore the TitleBar, the maximize button never receives a HoverLeave event and so displays the hover style when the window is restored and the maximize button is shown. Edit: The HoverEnter seems to function correctly when the window is restored, but the HoverLeave event still has the issue. A better example for the HoverEnter event may be a dynamic layout, where a widget is removed resulting in a different widget moving under the mouse.
  • QGraphcisView with QOpenGlWidget not updating properly on resize and scroll

    Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    H
    @jsulm oh, you're right. So maybe the real reason was I had to take back ownership of the widget every time the tab was closed, so it wouldn't get destroyed. Have been writing this app ever since I started learning programming an year ago, and I can't remember all of my decisions, sorry.
  • How to implement ZeroMQ into a Qt App?

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    SGaistS
    Hi, Depending on what you want to do, you might want to check the nzmqt project which provide integration with Qt. But before trying that, you should rather define your architecture first.
  • qCompress

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    U
    thanks. i will go for karchive then.. greetings
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • QT Serial Port

    Unsolved serial port c++ qt timer thread command line
    3
    0 Votes
    3 Posts
    793 Views
    Pablo J. RoginaP
    @ADR_PT you may want to start using QSerialPort the asynchronous (non-blocking) approach, by using signals & slots. Take a look at the serial terminal example