Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Debugging informations with qDebug()

    5
    0 Votes
    5 Posts
    5k Views
    Z
    You can also use "qInstallMsgHandler()":http://doc.qt.nokia.com/latest/qtglobal.html#qInstallMsgHandler to make qDebug() and friends output to whereever you like.
  • [QDbus] Using more object in the same service

    2
    0 Votes
    2 Posts
    3k Views
    S
    You can't :) Every class have their connection. You can add more object on the same connection. But you can't add an object on another connection. The only solution is create a connection for every class in the example you can create @ //First Object QDBusConnection connection = QDBusConnection::sessionBus(); connection.registerService("aa.bb.cc.One"); qDebug() << "register" << connection.registerObject("/One", this); @ @ //Second Object QDBusConnection connection = QDBusConnection::sessionBus(); connection.registerService("aa.bb.cc.Second"); qDebug() << "register" << connection.registerObject("/Second", this); @
  • MenuBar in DockWidget changes size

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QgraphicsScene & openGL, which can be the best approach to mix both ?

    3
    0 Votes
    3 Posts
    2k Views
    T
    Thanks. But you are agree with me that I cant do a 3D render using the items of GraphicsScene , ins't ? And what about QML3D?
  • Abstract Item Model - violates MVC?

    4
    0 Votes
    4 Posts
    3k Views
    A
    Returning QObjects from a QAIM would be way too resource intensive, so that is not really an option. You will have to realize that not all models represent data that is stored in that format, or even actually part of the application itself. It may just be showing a small part of a database, or of the file system, or... Notice however, that you can have your QAIM return a pointer to a QObject of your choice (or any other object) in a role of your choosing. So nothing is stopping you from implementing that. You can also use other roles to signify if a card is associated or not. Just define your own custom role id and go for it! In that case, you can use that role in a custom delegate to determine the rendering characteristics for that case. You are right that ideally, the model would only supply the actual data, the view would do the layout, and the delegate would do the rendering, but sometimes it is just convenient to be able to take a shortcut. You can also take the middle road, and use a proxy model to attach the formatting data to your data model. IMHO, the current MVD model in Qt has its flaws, but it is not that bad.
  • [Solved]XML downloadfile

    3
    0 Votes
    3 Posts
    2k Views
    T
    I'll try this and thank you again Works fine
  • How to update FILEVERSION & FILEOS flags from version.rc

    2
    0 Votes
    2 Posts
    2k Views
    G
    typically you include a header file withd efibnes for that. The only thing you must do is update the headerfile, e.g. like in "autoincreasebuildnr":https://www.gitorious.org/giesbert-s-software/autoincreasebuildnr EDIT: If you look at my world clock project, you can see how I used it: "gitorious link":https://www.gitorious.org/giesbert-s-software/giesbert-s-world-clock you have to look at version.h GiWorldClock.pro GiWorldClock.rc
  • Different versions of application

    6
    0 Votes
    6 Posts
    2k Views
    B
    Useful answers. Thanks a lot! I'll see what I can do.
  • [Solved] QProcess and recursive QThread

    6
    0 Votes
    6 Posts
    3k Views
    L
    [quote author="tucnak" date="1320351674"] Thread run QProcess. Thread finish process. [/quote] Well, you do not need threads to start external processes at all. A call to QProcess::start() immediately returns and the program runs as a completely independet process which doesn't influence or block yours in any way. If the state of the external process changes (aborted, finished) you are notified via signals. There is no need for recursion at all. Just loop through your list as Volker suggested.
  • QT and sandboxing apps for Mac OS ?

    15
    0 Votes
    15 Posts
    10k Views
    C
    Would it be possible to not use QFileDialog and instead write a class to use directly the needed cocoa API in objective-C? It should work, shouldn't it? It doesn't seem a too much work, altought if defeats Qt's purpose. A link explaining how to mix C++ and Objective-C in a Qt project: http://el-tramo.be/blog/mixing-cocoa-and-qt
  • Qt Cryptographic Architecture - after install

    2
    0 Votes
    2 Posts
    3k Views
    B
    The various features of QCA are accessed via plugins. You need to be sure the plugins were built, installed, and are being loaded. Do you have a crypto directory in your Qt plugins directory?
  • QStyleOptionMenuItem : need to know to position of the menu item

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [Solved] apple crash reporting

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Audio Echo Canceller

    3
    0 Votes
    3 Posts
    2k Views
    S
    I was hoping more like a Qt-provided solution. Since I couldn't find any, third-party library seems to be the only choice. @peppe: Thank you very much for replying.
  • QNetworkReply Error Timeout

    5
    0 Votes
    5 Posts
    7k Views
    H
    QNetworkReply::UnknownNetworkError being the only error generated by the QNetworkReply, regardless of the actual error, is working as intended? Weird.
  • [Solved] QMake variable manipulation

    4
    0 Votes
    4 Posts
    3k Views
    sierdzioS
    You're welcome, I'm glad to have helped.
  • Getting a return value from an emitted signal

    8
    0 Votes
    8 Posts
    22k Views
    F
    or some QMetaObject::invokeMethod() magic.
  • [Solved]XML readproblems

    15
    0 Votes
    15 Posts
    9k Views
    T
    Got it to work @void MainWindow::init() { //QFile file&#40;"C:/testprojekt/filesXML/cache.xml"&#41;; //QFile file&#40;"C:/testprojekt/filesXML/parts.xml"&#41;; QFile file&#40;"C:/testprojekt/filesXML/simple.xml"&#41;; if (file.exists()) qDebug() << file.fileName(); else qDebug() << "NO " + file.fileName(); file.open(QIODevice::ReadOnly); QXmlStreamReader xml_stream(&file); while (!xml_stream.atEnd() && !xml_stream.hasError()) { if (xml_stream.isStartElement() && xml_stream.name() =="description") ui->textBrowser->append( + "<" + xml_stream.name().toString() + ">" + xml_stream.readElementText()); xml_stream.readNext(); } ui->textBrowser->append("-------------------------"); xml_stream.clear(); file.close(); }@
  • Resolving a symbol in memory

    7
    0 Votes
    7 Posts
    4k Views
    F
    ok thanks, that should solve my problem.
  • Need help for delegate.paint. Does not work for me ...

    2
    0 Votes
    2 Posts
    2k Views
    G
    The widget, where you call render is invisble (show is never called). This implies, it is not painted.