Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • 0 Votes
    5 Posts
    468 Views
    J
    @Abderrahmene_Rayene Thanks for your reply. In the end, I used CustomiDelegate, and the stylesheet of the table usually needs to be added with " "QTableWidget::item { padding:1px; }QTableWidget { gridline-color: #303030; }" class CustomDelegate : public QStyledItemDelegate { public: CustomDelegate(QObject* parent = nullptr) : QStyledItemDelegate(parent) {} void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override { painter->setPen(QColor(0x303030)); if (index.row() == 0) painter->drawLine(option.rect.topLeft(), option.rect.topRight()); if (index.column() == 0) painter->drawLine(option.rect.topLeft(), option.rect.bottomLeft()); QStyledItemDelegate::paint(painter, option, index); } };
  • I am lost the Qt5.15.x, and I am connot find it.

    Unsolved
    3
    0 Votes
    3 Posts
    170 Views
    A
    @sierdzio Thank you very much, I fond it in"Archive".
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • QChart

    Unsolved
    2
    0 Votes
    2 Posts
    165 Views
    SGaistS
    @dan1973 hi, Isn't that because you set a range of 0 to 600 ?
  • Small example showing QTimer slowing to a halt

    Unsolved
    17
    0 Votes
    17 Posts
    4k Views
    M
    Posting here just in case someone comes across this -- I ~think~ I found the solution to be related to app nap, originally discovered here. My application was in python, so I was able to use appnope to ensure my python application wasn't throttled & this solved my manifestation of this problem.
  • How we can add maximize, minimize functionality in QT based Application ?

    Unsolved
    6
    0 Votes
    6 Posts
    462 Views
    SGaistS
    @Qt-embedded-developer then share a minimal compilable example that shows your issue.
  • QApplication holds all threads for ~10s on intel macs

    Solved
    5
    0 Votes
    5 Posts
    469 Views
    M
    @ChrisW67 Seemed to have found the solution!! The key was found here -- macOS was throttling with App Nap. Solved by installing appnope, and including import appnope appnope.nope() at the top of any PyQt application.
  • Transparent Window with Qt Widgets

    Unsolved
    5
    0 Votes
    5 Posts
    779 Views
    C
    Hi, Thanks for sharing. You might find these links useful, they contain more information about this: Qt Widgets Examples — Translucent Background Frameless and transparent window
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • How to change QVector to QString

    Unsolved
    9
    0 Votes
    9 Posts
    781 Views
    JonBJ
    @sonichy What is your actual question/problem? If you have a list of numbers (integers or floats) and you want to save it to settings as a string and restore it as a list of numbers, and for some reason you don't want to do it via a QVariant like @ChrisW67 suggested, (is that what you want?) you need to: To save, you need to iterate the list calling QString::number() on each one to build up a comma (or other character)-separated string, then pass that to settings. To restore, you need to call QString.split() to split the string into items and call QString::toInt/Float() on each one to convert back to numbers. Of course, if you have the numbers stored as a separated string in your text edit or elsewhere and you only want to deal with that then you don't need to do joining/splitting/converting from/to numbers. UPDATE @sonichy said in How to change QVector to QString: @mpergand I accept your code You have gone back and changed your post to say "I accept your code" now, maybe you mean you have no problem, I don't know.
  • Using resource in QSslCertificate::fromPath

    Unsolved
    3
    0 Votes
    3 Posts
    273 Views
    T
    @hskoglund I just tested your proposal, but unfortunately it didn't work. I also tried without any wildcards and just wrote out one of the names and that didn't work either. I'm beginning to suspect that fromPath doesn't work with resources but I can't find any proof that it shouldn't
  • QPushButton cannot be released

    Solved
    10
    0 Votes
    10 Posts
    588 Views
    JonBJ
    @MoonBrid said in QPushButton cannot be released: @JonB If I don't use processEvents(), that causes another problem. The program will block in the while loop, and the interface will become unresponsive, unable to press the button_2. Sorry, I give up. That is not what I asked you. I have asked/suggested more than once that you remove the processEvents() and then tell us whether the behaviour of holding the button down during the 2 seconds and then releasing it afterwards does or does not recognise the button up. That is all you had to try. I don't understand why it's so difficult to try something while you diagnose. No more from me now.
  • Capture system camera frames from thread

    Unsolved
    5
    0 Votes
    5 Posts
    424 Views
    Ronel_qtmasterR
    @FalsinSoft SORRY I AM not using qt6
  • Deploy issue: libpq.5.dylib not found

    Unsolved
    2
    0 Votes
    2 Posts
    335 Views
    SGaistS
    Hi, Where do you have that library on your build machine ?
  • Qt6 C++ program crashes when a Dialog window closes

    Solved
    4
    0 Votes
    4 Posts
    355 Views
    SGaistS
    @EricR anything that is not a explicitly allocated on the heap is on the stack. Make lineSeries a pointer and allocated it using new in the constructor.
  • 0 Votes
    5 Posts
    641 Views
    J
    @SGaist Great!! Thanks!!
  • Could the qtablewidgetitem set the stylesheet?

    Unsolved
    4
    0 Votes
    4 Posts
    247 Views
    jeremy_kJ
    A custom item delegate might be required.
  • Qt 6.2.4 cross-compiled app hangs in ppoll

    Solved
    2
    0 Votes
    2 Posts
    276 Views
    V
    What the... ok, in case anyone ever runs into this. This is caused by compiling Qt 6.4.2 without harfbuzz. Why? Don't ask me.
  • Memory safety

    Unsolved
    19
    0 Votes
    19 Posts
    3k Views
    S
    Coincidentally, today my colleague sent me a Google paper about memory safety in C++: https://research.google/pubs/secure-by-design-googles-perspective-on-memory-safety/
  • How do I connect an action responding to a menu bar item?

    Solved widget
    3
    0 Votes
    3 Posts
    466 Views
    J
    @Pl45m4 Thanks!!!!