Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • How to update a QTableWidget row by row

    3
    0 Votes
    3 Posts
    3k Views
    M
    Glad you figured it out! Be sure and add [Solved] to your thread title in the initial post. Thanks!
  • Filter filename in QDialog

    14
    0 Votes
    14 Posts
    6k Views
    B
    AFAIK and without RTFM the name of the actual file (project1.cst) or the pattern (*.exe) must be enclosed by brackets.
  • How to set the width of a column on QTableWidget

    4
    0 Votes
    4 Posts
    10k Views
    G
    thanks for your interest in this matter @qxoz.
  • [solved] parentwidget problem

    3
    0 Votes
    3 Posts
    1k Views
    B
    Sorry, my fault was :) I put into the child wrong class type...
  • Stl search equivalent

    5
    0 Votes
    5 Posts
    2k Views
    B
    indexOf of QString isn't good? @ QString str = "We must be <b>bold</b>, very <b>bold</b>"; int j = 0; while ((j = str.indexOf("<b>", j)) != -1) { qDebug() << "Found <b> tag at index position" << j; ++j; } @
  • Beginners: how to loop qphraphicsobjects in a scene

    6
    0 Votes
    6 Posts
    2k Views
    U
    Yes that is possible too, only it is on instance level instead of class level. It saves on creating your own hierarchy thou. I am not sure if it will end up using more memory than just having a method that returns a hard-coded enum value.
  • Command Line Application with qmake in MacOSX?

    3
    0 Votes
    3 Posts
    2k Views
    K
    Thank's a lot! :)
  • Circular buffer model

    5
    0 Votes
    5 Posts
    8k Views
    S
    Ok that clears things up a bit. I did figure that the beingRemove/endRemove stuff was a protection mechanism, but I didn't realise it would always (at least in my case) cause a dataChanged to be emitted for the entire model. I had sort of thought that the redrawing would be smarter when using the more precise insert/remove operations rather than the more blunt beginResetModel/endResetModel, although I can see in this case that when you remove the first item(s) all other item's indexes are changed. Is it possible to have a model which doesn't have it's indexes starting at 0, so after the buffer is filled, on the next insertion, a new item would be added with an index one larger than the current last item, and all of the other indexes would remain the same, but there would no longer be an index 0? I didn't quite follow this comment bq. You might want to use the QTextEdit to display a number of lines. If the number of lines get to big set the overwrite function and set the insertion position back to 0? are you talking about a different way of implementing this, because at the moment, I have a fixed size fifo, so the number of lines will increase to the size of the fifo then remain constant. At any rate, I've fixed some bugs in my code and it does work correctly inserting rows until full, then doing a remove followed by an insert once full. Once the buffer is full, on a removal I take note of the top visible item, and adjust it for the number of lines being removed/inserted, and then use QTableView::scrollTo to ensure it is still the top item after the insertions are complete. This is a bit messy, but achieves the effect I desired. I guess this is the scenario which could be optimised though, where all the data on screen is unchanged, but will get redrawn on an insertion. I think it's an interesting problem too, which is why I'm keen to discuss it. Thanks again for your thoughts on the topic.
  • [Solved] Bouncing Tray Icon at Program Start

    12
    0 Votes
    12 Posts
    5k Views
    H
    Even though this problem has been solved a long time ago I'd like to add that you can refresh Finder's view on .app-folders (including options set in the Info.plist) by executing touch on the .app-folder.
  • [SOLVED] C commandline-application without X11

    3
    0 Votes
    3 Posts
    1k Views
    H
    Its without Qt (CONFIG -= qt) but I still don't get what X11 has to do with it. EDIT: My bad...it was just the debug-window.
  • Qt Threading Issues in Linux

    3
    0 Votes
    3 Posts
    3k Views
    A
    I believe he was trying the demo from: blog.qt.digia.com/2011/06/03/threaded-opengl-in-4-8 and it looks like the QTextWidget is being added from the main thread (from the line number he gave). I've tried the demo that Qt released, and it works fine on my mac with the added QTextWidget, so maybe it's an X11 bug?
  • List of tranlatros in QApplication

    6
    0 Votes
    6 Posts
    2k Views
    M
    Keeping track of them yourself would be the easiest thing. Otherwise you have to dig down into the internals of QCoreApplication/QCoreApplicationPrivate where the translators list is deeply hidden. (The sources are there to view, if you are curious, though.)
  • I STRONGLY NEED to know slot where signal is connected to.

    32
    0 Votes
    32 Posts
    31k Views
    A
    [quote author="ZapB" date="1348564437"]You may want to have a look at the GammaRay... It can be found on git hub at https://github.com/KDAB/GammaRay[/quote] Wow this look absolutely awesome! Definitely worth the try!
  • Generic progress reporting system design

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Thread-safe usage of QList<QString> ?

    5
    0 Votes
    5 Posts
    7k Views
    K
    You could also try to use "QReadWriteLock":http://qt-project.org/doc/qt-4.8/qreadwritelock.html or "QMutexLocker":http://qt-project.org/doc/qt-4.8/qmutexlocker.html, they are easier to work with and abolutely sufficient for your use case.
  • [SOLVED] Ukranian default translation file.

    5
    0 Votes
    5 Posts
    2k Views
    sierdzioS
    UK's signature is en_GB, by the way (English - Great Britain).
  • Graph (nodes, edges) Drawing in Qt

    4
    0 Votes
    4 Posts
    5k Views
    U
    I don't think there is an example you can directly use, examples are simple and serve one purpose, and that is to show you how things are done so you can do them yourself. Anyway, learning QGraphicsView is not all that hard, and when you learn it it won't be hard to implement the functionality you need.
  • [SOLVED] QTextEdit: stack overflow caused by special key

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    1 Posts
    905 Views
    No one has replied
  • QFileOpenEvent comes with truncated URL [SOLVED]

    4
    0 Votes
    4 Posts
    2k Views
    M
    bq. [SOLVED] Be sure and edit your initial post and add [Solved] to the thread title.