Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Can't read a whole xml file

    12
    0 Votes
    12 Posts
    6k Views
    A
    [quote author="annatz" date="1319793761"]my problem andre was to create the root element. thank you both. i will do it in that way ka510[/quote] Sounds obvious to me that if you ask for an element to be created multiple times, then it will be. So, the solution is simply to create the opening tag for the root element once, create all the content, and then create the closing tag for the root element. And 'once' here then means: outside your loop writing away your data.
  • [solved]Can proxy cause "connection timed out"?

    5
    0 Votes
    5 Posts
    5k Views
    M
    Thanks a lot peppe.
  • 0 Votes
    5 Posts
    6k Views
    L
    Haven't seen this function Andre. All fine now. Thanks )
  • QGraphicsScene - not updated after QGraphicsItem moved

    4
    0 Votes
    4 Posts
    5k Views
    R
    Try to "update the geometry":http://doc.qt.nokia.com/latest/qgraphicsitem.html#prepareGeometryChange or you can set to scene this flag "QGraphicsScene::NoIndex":http://doc.qt.nokia.com/latest/qgraphicsscene.html#ItemIndexMethod-enum maybe this will be better for your dynamic scene.
  • QTabWidget: different close image for selected Tab

    5
    0 Votes
    5 Posts
    5k Views
    W
    [quote author="Andre" date="1319795356"]Shouldn't the last be @ QTabBar::tab:hover @ ? [/quote] Right.
  • Running an application to a symbian device

    4
    0 Votes
    4 Posts
    2k Views
    L
    [quote author="annatz" date="1319793875"]i understood where the files are stored. thanks. I find a program "file browser" that opens the private folder of my app and from there i can copy my xml file.[/quote] You are welcome :) I am glad that the issue is solved.
  • Quickest way to search a directory for files with a specified extension

    7
    0 Votes
    7 Posts
    46k Views
    A
    I would make a recursive method that combines cincirin's method of listing the actual files with a recursive approach to get the subdirectories of the current directory, and do the same for each of those subdirectories. One thing about recursive methods like these: I foudn that it is convenient to wrap them in a non-recursive method. That method is then the API, the recursive one is an implementation detail that needs to be private. The reason is that often the method signature that you need for the recursive function is not optimal for the API of your class. It exposes too much internals of the recursive nature of the function. Though, I guess, you can do without in this case.
  • Facing problem in use of QtConcurrent.

    5
    0 Votes
    5 Posts
    3k Views
    F
    I guess you have to specify the instance on which the method has to be called.
  • Unwanted padding around QHBoxLayout

    3
    0 Votes
    3 Posts
    9k Views
    F
    Solved the second problem regarding the vertical scroll bar... called adjustSize() on the group and on the widget containing the group. @ void SettingsViewGroup::titleClicked() { _content->setVisible(_contentHidden); _contentHidden = !_contentHidden; adjustSize(); // <-------------- ADDED _parent->updateLayout(); // <-------------- ADDED } void SettingsView::updateLayout() // <-------------- ADDED { _content->adjustSize(); } @
  • 0 Votes
    25 Posts
    15k Views
    T
    thanks jetimms, ugur
  • QWebView and encoding

    9
    0 Votes
    9 Posts
    6k Views
    P
    And again i'm surprised how i could miss it. I guess i need to sleep less. Thanks. But as i have found QWebView::load() suits better since manually forming data lets me get it from my program's interface, not from webpage.
  • Problem with QSplitter - won't resize widgets? [Fixed]

    8
    0 Votes
    8 Posts
    9k Views
    L
    Aaaargh, just found out one of my team members added a QSizePolicy::Fixed in the wrong spot ><.
  • Running Flash plugin in Qt app

    8
    0 Votes
    8 Posts
    5k Views
    G
    Unfortunately I cannot grant Mad Scientist status, but that approach looks decently insane and deserves some extra points :-) From what I heard - recall that I didn't get my hands dirty with that - ActiveX controls should be embeddable in Qt. Did you have a look at the "ActiveX docs":/doc/qt-4.7/activeqt.html already?
  • QByteArray Remove not working?

    3
    0 Votes
    3 Posts
    3k Views
    G
    Additionally, check the values of your positions and difference whether they are sane.
  • Does Qt-dev have publicly published regression testing for builds?

    4
    0 Votes
    4 Posts
    2k Views
    F
    I would expect there to be an easy way to run all the tests (make test?), but I've never done so myself, so I actually don't know.
  • [Resolved] How to translate the enumeration of Qt

    5
    0 Votes
    5 Posts
    5k Views
    S
    Thanks for All. I have do it. How did I do? When I built the list of values for my enumeration, I put this value in tr (). And I tranlate that value in my file. <. ts> Exemple: @QMetaEnum metaEnum = QObject::staticQtMetaObject.enumerator(index); QStringList enumNames; for (int i = 0; i < metaEnum.keyCount(); i++) { enumNames << tr(metaEnum.key(i)); }@
  • Image Rendering with QGraphics Framework

    2
    0 Votes
    2 Posts
    2k Views
    R
    You should check the QGraphicsPathItem. Provide a QPainterPath for your waveform, it will be repainted appropriately for the different zoom levels. QPainterPath turn out to be pretty fast. I don't know however if this item has some caching for different path approximations for different zoom levels but you could probably implement that if it does not exist.
  • Event Filter receiving unexpected mouse move events

    3
    0 Votes
    3 Posts
    3k Views
    R
    Did you use QWidget::grabMouse() on your fullscreen window at some point ?
  • XML parsing problem (error triggered by consumer)

    2
    0 Votes
    2 Posts
    3k Views
    M
    Looks like the problem is in my content handler, if i comment it out the parsing succeeds. @//xmlReader.setContentHandler(this)@ I guess it was stupid of me to leave implementing it for later, all i had there was a qDebug() which i omitted from the above posts output. I just wanted to test if everyting works before i continue working, time to implement the handler then :) Thanks anyway!
  • QWidget Subclassed Stylesheet

    2
    0 Votes
    2 Posts
    2k Views
    R
    Try adding a Q_OBJECT to your Base class delcaration. A good rule of thumb is to always add the Q_OBJECT macro to all classes that inherit Q_OBJECT. Concerning the QVBoxLayout it is a QObject whose ownership belongs to its parent (your widget). It will be destroyed when the widget is itself destroyed. Look at the documentation of QObject for more informations.