Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • Problem Building Qt C++ Examples

    13
    0 Votes
    13 Posts
    15k Views
    O
    Thanks, that got me a bit futher but then i ran into another known problem -> http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1889 I was eventually able to get past this but why hasn't this been bug resolved? Should I reopen this bug? This is experience does not leave a good impression especially as a first time user.
  • QStackedWidget vs. QStackedLayout

    6
    0 Votes
    6 Posts
    15k Views
    D
    [quote author="maciek" date="1292417292"]OK, thanks for your answers - layout will do the work for me. peppe: according to some "documentation":http://doc.qt.nokia.com/4.7/model-view-programming.html#convenience-classes it seems that widgets stays to be "compatible" with Qt3. "These classes are less flexible than the view classes, and cannot be used with arbitrary models. We recommend that you use a model/view approach to handling data in item views unless you strongly need an item-based set of classes."[/quote] Their API is similar, sure, but this doesn't make them outdated or deprecated. They have their (very limited and specific) use case, that's it :)
  • QTcpSocket && check cable disconnected

    13
    0 Votes
    13 Posts
    29k Views
    L
    [quote author="peppe" date="1292409180"] Use IPPROTO_TCP everywhere, not SOL_TCP. [/quote] What is the difference ? It seems to work with SOL_TCP ...
  • Script implementation of getItem() ignoring case of simillar items

    10
    0 Votes
    10 Posts
    5k Views
    P
    Dear Bradley - sorry about the previous spelling, Stefan Löffler on TeXworks development, has built your code under the normal TeXworks build process and we are testing it now to try and solve the issue. http://web.student.tuwien.ac.at/~e0325258/projects/c/texworks/lowercase-array.exe Paul
  • Collaboration via Git and SourceForge

    3
    0 Votes
    3 Posts
    3k Views
    S
    Or you can use a subversion to a repos.
  • SizeOf Struct giving false number.

    13
    0 Votes
    13 Posts
    12k Views
    G
    [quote author="peppe" date="1292353920"]That's what he meant: "nextid" is aligned on word boundary (and ends on the next one), then we have 9 chars, therefore we need 3 bytes of padding at the end of the struct (to pad the whole struct to a word boundary). If we consider also the byte added before the "nextid" field, we get the 4 bytes of difference between sizeof() and the sum of fields. And by the way, you can use the offsetof() macro to pick up offsets inside a struct. [/quote] Sorry, I misinterpreted it as padding between step and reserved to have reserved start on a word boundary - my fault. Good to know of offsetof() - I hope I will never have to use it myself in live code ;-)
  • Resizing widget in a gridlayout

    2
    0 Votes
    2 Posts
    4k Views
    W
    NeverMind, I figured it out( fyi the code above is not the function to which i was having issue, i posted the wrong one)
  • QDomDocument.createTextNode

    2
    0 Votes
    2 Posts
    3k Views
    G
    This behavior is ok and creates a valid XML document. It's not needed to quote the ending > with > outside a CDATA section, according to the "XML standard":http://www.w3.org/TR/REC-xml/#syntax To answer your last question: No, there is no way to change this.
  • [SOLVED] How to build Release with debug info (MinGW)

    4
    0 Votes
    4 Posts
    26k Views
    U
    Ok, I solved it myself. The file qt\mkspecs\default\qmake.conf defines the following linker flags: QMAKE_LFLAGS_RELEASE = -Wl,-s The linker flag -s means: Omit all symbol information from the output file. So it is the linker that removes all debug information from release build. So if you want to build a release version with debug info you need to define the following in your pro file: QMAKE_CXXFLAGS_RELEASE += -g QMAKE_CFLAGS_RELEASE += -g QMAKE_LFLAGS_RELEASE = Now I can properly debug the release build of my application.
  • Advice on checking for memory leaks and dangling resources?

    17
    0 Votes
    17 Posts
    14k Views
    D
    AQTime can detect memory leaks, but it's mainly for profiling. Intel Parallel Inspector (is also part of the Intel Parallel Studio) is another option. Both are commerical, but you can always get a trial version.
  • SQLite date field

    6
    0 Votes
    6 Posts
    8k Views
    D
    [quote author="Jonathan" date="1292314669"]I've created a general purpose programme for creating, managing, and editing arbitrary SQLite databases. I'm aware that dates do not have their own storage format. However this makes it hard to decide whether or not a field is a date field. Not knowing makes it difficult to present the correctly formatted data to the user. [/quote] You can't; you can try a best guess, i.e. the column has type TEXT and all the rows are formatted like ISO8601 strings then it's very likely that it contains dates (of course, it is perfectly possible that it simply stores text which "looks like" dates). You can't say anything for INTEGER / REAL types. My advice would be simply letting the user choose if a given column is storing dates or numbers/text. :-)
  • Access Widget Palette Colors from QSS StyleSheet

    5
    0 Votes
    5 Posts
    8k Views
    I
    [quote author="peppe" date="1292279793"] [quote author="ivan.todorovich" date="1292274078"]Is it possible? IE: background-color: LinkVisited;[/quote] Yes: use the PaletteRole http://doc.trolltech.com/latest/stylesheet-reference.html#paletterole[/quote] Thanks!! That's exactly what I needed :)
  • Undefined reference to '_imp__ZN9QGLWidgetC2ERQ9QGLFormat...'

    8
    0 Votes
    8 Posts
    4k Views
    V
    First: Qt is not QT(QuickTime) Second: What do version of Qt you use? May be it was build without opengl support?
  • QGLContext from GLXContext?

    10
    0 Votes
    10 Posts
    5k Views
    B
    [quote author="peppe" date="1292266420"]Well, how about going the other way around? Namely, if GUI is enabled, then the core part asks it for a context, otherwise it goes ahead and creates one?[/quote] Yeah. This is what we are doing at the moment. I was wondering if there was a different way.
  • QSharedPointer Usage

    6
    0 Votes
    6 Posts
    15k Views
    G
    It's the other way round, that can do you some harm. If you destroy the objects yourself and if you set the parents correctly, it can happen, that your objects will be destroyed twice, which will lead to segfaults. Even the Trolls stepped into this trap in their official docs (see the "Getting started example is buggy":http://developer.qt.nokia.com/forums/viewthread/2253/ thread), although in a slightly different way.
  • QGLWidget does strange drawings

    11
    0 Votes
    11 Posts
    6k Views
    A
    hm, i don't think that this occures because of bad programming. I just used the 2D painting example that comes with Qt. I just added a few buttons to enable/disable antialiasing dynamically. Antialiasing is done by calling the QPainter::setRenderHint method with the arguments QPinter::Antialiasing and QPainter::HighQualityAntialiasing.
  • Qt + QGLWidget Debug problem

    10
    0 Votes
    10 Posts
    6k Views
    B
    Very welcome. If you have time, please update this topic after the upgrade and let us know if it did indeed solve the problem. Thanks.
  • QProgressBar Chunk

    10
    0 Votes
    10 Posts
    17k Views
    J
    It is a marquee bar. From Qt Documentarion: bq. If minimum and maximum both are set to 0, the bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using QFtp or QNetworkAccessManager to download items when they are unable to determine the size of the item being downloaded. Tested and working
  • How C++ lambdas affect Qt?

    10
    0 Votes
    10 Posts
    6k Views
    B
    [quote author="Robin Burchell" date="1292087574"]Don't know if you knew, but Thiago has a patch working towards allowing exactly that :)[/quote] No, I didn't. Where does he talk about it? Is it available somewhere?
  • What exactly does "Clipping" mean when we talk about painting in Qt?

    5
    0 Votes
    5 Posts
    8k Views
    B
    Note that in the QGraphicsView framework, the items are not clipped by default like the widgets are, but you can optionally request that they are clipped.