Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Include <QtDebug> in QT 4.7.4

    13
    0 Votes
    13 Posts
    6k Views
    G
    If you use QDebug, you need Qt libs too, otherwise you get a linker error, even if the compiler doesn't bail out prematurely. So it dosen't make sens at all to not create a Qt project.
  • Qt application, creating and editing a text file

    3
    0 Votes
    3 Posts
    2k Views
    C
    Thank you, always good to check the documentation.
  • [SOLVED] QThread is not working

    5
    0 Votes
    5 Posts
    4k Views
    ?
    Unless to sync your threads all you can expect is the unexpected, it is completely normal to get different output every time. The "seemingly" perfect output I got when I tested your code was purely by coincidence, by adding a name variable for every thread the ugly truth behind multithreading is revealed: !http://i40.tinypic.com/9llbf9.png(threads)! It is the operating system thread scheduler that manages running threads, and besides setting priority there is not much you can do, unless you sync your threads.
  • [SOLVED]Microsoft Visual Studio 2010 compiler

    12
    0 Votes
    12 Posts
    10k Views
    M
    I'm not used with Creator...I'll try the Creator when I will have a deeper undestanding in QT and more experience in it.I learnt C++ and Qt on my own and still got a lot to learn.
  • QApplication and QSettings ordering hang

    5
    0 Votes
    5 Posts
    4k Views
    N
    I have the same issue and can reproduce it with the minimal testcase on Alpine Linux. The applications that needs QSettings before QApplication is rosegarden. They read the style from qsettings and QApplications::setstyle needs to be called before the application constructor. Chicken and the egg... Someone have reported it here and has a qsettings patch as suggestion: http://sourceforge.net/tracker/?func=detail&aid=3168620&group_id=4932&atid=104932 I have no idea if this is a proper fix. @--- src/corelib/io/qsettings.cpp 2010/11/06 01:55:18 1.1 +++ src/corelib/io/qsettings.cpp 2011/02/24 02:15:51 -117,7 +117,7 Q_GLOBAL_STATIC(ConfFileCache, unusedCacheFunc) Q_GLOBAL_STATIC(PathHash, pathHashFunc) Q_GLOBAL_STATIC(CustomFormatVector, customFormatVectorFunc) -Q_GLOBAL_STATIC(QMutex, globalMutex) +Q_GLOBAL_STATIC_WITH_ARGS(QMutex, globalMutex, (QMutex::Recursive)) static QSettings::Format globalDefaultFormat = QSettings::NativeFormat; #ifndef Q_OS_WIN @
  • Creating system-wide Qt themes? (Icons, Qt Style, etc)

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • How to get system icon by file extension

    2
    1 Votes
    2 Posts
    2k Views
    A
    You sure can (on Windows, anyway), but it is up to you to do it. It will take some windows 32 API and/or registry reading to get to the right image, but it is certainly doable.
  • Phonon example

    3
    0 Votes
    3 Posts
    2k Views
    V
    See chapter 2 of book Advanced Qt Programming. Creating Great Software with C++ and Qt 4, Mark Summerfield.
  • [Solved]Strange Error

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    T
    I just closed the topic as requested.
  • Question regarding future of QWidget

    5
    0 Votes
    5 Posts
    5k Views
    S
    Thank you Mr Volker your comment and the Anatomy of a real world application was very informative.I got my questions answered.
  • Reading floats from binary STL file with QDataStream

    7
    0 Votes
    7 Posts
    8k Views
    G
    Yes, that's true. Unfortunately I was convinced that QDataStream writes its version to the start of the stream. But that's not true.
  • QAbstractItemView::dataChanged problem with ranges

    5
    0 Votes
    5 Posts
    4k Views
    B
    I found some tickets in QT's JIRA, one of them: QTBUG-13668. It seems this is the expected behavior, although I have some questions about it. I sow the source code of QAbstractItemView::dataChanged and there is a big difference handling topLeft == bottomRight and topLeft != bottomRight. In the first case only the cell with the given index is updated, in the second case, it passes the update responsibility to the viewport. For me this is a strange behavior, I would expect that the update was always handle by the viewport or always handled by QAbstractItemView and not distinguished if is only a cell or more. I can see 2 solutions: Re-implement dataChanged method; Emit one signal for each cell. Any other suggestion would be appreciated. Tia, Bruno
  • QProgressDialog, bug in Qt 4.8.0 or something else ?

    6
    0 Votes
    6 Posts
    4k Views
    A
    So it seemed like I've got a crash when setting value to "1" : @progress.setValue(1);@ I tried to set value to zero before it, as here:http://developer.qt.nokia.com/forums/viewthread/8993 But it has no effect. One more thing: when I make some delay before calling setValue by putting sleep for 10 msecs, all working good.
  • Connection/Slot question

    4
    0 Votes
    4 Posts
    2k Views
    P
    Oh, yes, forgot to mention. Thanks.
  • QT 4.7 cannot receive multi-touch events.

    11
    0 Votes
    11 Posts
    9k Views
    E
    http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/log/ xinput-evdev driver only just merged the multitouch features: 2011-12-22 Merge branch 'multitouch'
  • Extract embedded resources

    10
    0 Votes
    10 Posts
    8k Views
    G
    The files are stored "as is". qrc does not manipulate the contents. While stand alone qrc files (to be loaded after application startup) can be compressed, the compiled in resources are one to one copies of the bytes of the files on the disk. For qrc it's only files, it is not aware of the concept of images or the like.
  • Future of QGraphicsView

    2
    0 Votes
    2 Posts
    3k Views
    A
    No, it will still be available as-is. The new scenegraph stack will be available next to the current widget/QPainter based stack, including QGraphicsView and friends.
  • Playback audio file from server in Qt GUI

    4
    0 Votes
    4 Posts
    3k Views
    T
    I don't have much experience in streaming. But from the limited knowledge I'd say; for a simple internal network, I think you're fine with SMBFS, since the connection speed is really high and you don't need to stream manually. If you're gonna go for an internet connection then that depends on the server you're getting the data from. It's rather a complicated decision. There's not "better", but there's "what you need". But basically, such a program has to be able to connect with HTTP and FTP, both. If you just want to learn, I'd suggest that you go to some open-source project and contribute there, where you could see what pros are doing and how they're dealing with stuff. It's not only being able to program, but also using the correct "design pattern" that is reusable and easy to inherit. Read more about design patterns. Regards.
  • 0 Votes
    7 Posts
    5k Views
    Z
    Yes I can. I am in the process of merging the fix into Qt 5 and 4.8. I need to resolve a build issue on the Mac first though. I will look at this tonight or tomorrow. The issue is "here":http://codereview.qt-project.org/#change,16794 if you are interested to watch it.
  • Dynamically create QObject classes

    2
    0 Votes
    2 Posts
    3k Views
    T
    I suggest you read about object pools. http://en.wikipedia.org/wiki/Object_pool_pattern And then find some implementation to that.