Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • How the different licenses work with different libraries

    2
    0 Votes
    2 Posts
    976 Views
    A
    Please search the forum first. These issues have been discussed many times before. Always keep in min that you should assume people on this forum are NOT lawyers and are not qualified to give legal advice. That includes me.
  • 0 Votes
    4 Posts
    2k Views
    sierdzioS
    No, AFAIK, in Qt4 it's still QWS.
  • When I download Qt libraries 4.8.2 for embedded Linux. Is it QWS or QPA ?

    2
    0 Votes
    2 Posts
    2k Views
    T
    Hi, ~aabc! It should be with QWS. But I am not sure. I found this information on "Gitorious":http://qt.gitorious.org/qt/qt/blobs/4.8/dist/changes-4.8.2#line173 As far as I understood, if in Qt 4.8.2 changelog in RTOS listed QWS, it should be QWS instead of QPA, but I am not sure.
  • How to wait for 'deleteLater'?

    7
    0 Votes
    7 Posts
    11k Views
    D
    [quote author="Andre" date="1340784921"]Would it be an option to use the QObject::destroyed() signal? By the time that one is emitted, the widget parts of the object have already been destroyed.[/quote] finally I found solution to wait for destroy: @widget->deleteLater(); widget->exec();@ unfortunately, delete qApp; still corrupts memory: Message: First-chance exception at 0x133a79b2 (QtGuid4.dll) in ustation.exe: 0xC0000005: Access violation reading location 0x0000000c. (Call stack:) @> QtGuid4.dll!qThreadStorage_deleteData<QFontCache>(void * d=0x141f4010, QFontCache * * __formal=0x00000000) Line 97 + 0x22 bytes C++ QtGuid4.dll!QThreadStorage<QFontCache *>::deleteData(void * x=0x141f4010) Line 140 + 0xe bytes C++ QtCored4.dll!QThreadStorageData::set(void * p=0x00000000) Line 165 + 0x7 bytes C++ QtGuid4.dll!qThreadStorage_setLocalData<QFontCache>(QThreadStorageData & d={...}, QFontCache * * t=0x0028e35c) Line 92 + 0x12 bytes C++ QtGuid4.dll!QThreadStorage<QFontCache *>::setLocalData(QFontCache * t=0x00000000) Line 155 + 0x14 bytes C++ QtGuid4.dll!QFontCache::cleanup() Line 2804 C++ QtGuid4.dll!QFont::cleanup() Line 111 C++@ What could I try to find a source of this issue? I have put a breakpoint into QThreadStorageData::set() but it never gets called during Widget destruction, so I can not identify what is going wrong. Could you please suggest where to look (in QT source) to find source of this issue? Thanks.
  • Strange behavior QSqlQuery and "Driver Not Loaded Error"

    9
    0 Votes
    9 Posts
    10k Views
    L
    I'm quite sorry, but I'm having a hard time understanding you; you will find a sketch attached how such a task could be done in principle and it's up to you to fit it to your concrete requirement. @ bool importFile(const QString &fileName) { QFileInfo fileInfo(fileName); if(fileInfo.exists(&#41; == false&#41; return false; QSqlQuery query; query.prepare("INSERT INTO " + QLocale(QLocale::English&#41;.toString(fileInfo.lastModified().addDays(-1), "MMMM").toLower() + "_ama (answer, ..., offset) VALUES (?, ..., ?)"); do { readNextRecordFromFile&#40;&#41;; query.addBindValue(readNextValueFromRecord(&#41;&#41;; ... query.addBindValue(readNextValueFromRecord(&#41;&#41;; } while ((query.exec&#40;&#41; == true&#41; && (lastRecordRead(&#41; == false)&#41;; return ((query.isActive() == true) && (lastRecordRead(&#41; == true)); } @ Brain to terminal. Exemplary. And make sure you've had a good read on C++, design principles, Qt and the Qt SQL module.
  • Synchronization of mp3 tracks on Qt

    2
    0 Votes
    2 Posts
    1k Views
    T
    Hi, ~Uncannytable. Welcome to fun Qt Developer Network! I will quote user who answer your question on another "resource":http://forum.codecall.net/topic/70523-synchronyzing-mp3-tracks-on-qt/: [quote author="Programming God" date="1340740020"]So you are creating instance of Phonon:MediaObject for each mp3 tracks in a song? I mean, as example, if you have 3 mp3 tracks for 3 instruments in a song, you are creating 3 instances of Phonon:MediaObject for playing 3 different tracks? I think you are doing this and that's why the synchronization term is here, right? Now how you are trying to do the synchronization? Or, you are not doing at all to keep the tracks synchronized? AFAIK, Mobility will not run on PC?[/quote]
  • Debugger cannot evaluate content of class

    4
    0 Votes
    4 Posts
    2k Views
    T
    [quote author="rooney" date="1340787297"]Solved the problem!! On Debian Squeeze GDB 7.01 is installed but Qt Creator requires Python enabled GDB 7.4. So I followed the instructions on http://qt-project.org/wiki/QtCreatorBuildGdb. [/quote] Good job!
  • [SOLVED] how to invoke Qt method in web page

    4
    0 Votes
    4 Posts
    2k Views
    L
    at last, i found a urgly way to solve this problem, via signal beforenavigate(). in web page, call window.navigate() with a special string, something like window.navigate("specialstring: xxxx"). then, signal beforenavigate will be emited. now, we can block the navigation, and process our own work.
  • Multiple Clients on QTcpServer

    8
    0 Votes
    8 Posts
    17k Views
    K
    It is depending on the number of of clients you have to serve. However, apparently, the number of clients is not high. Otherwise sending to all clients creates quite some overhead. I never used sender(), so I cannot comment. For disconnecting you could go through your list and check each socket for lost connection and remove, when necessary. However, when you are earmarking with the address or other means the signals as in the example I have provided in the post, you can get around these things.
  • 0 Votes
    6 Posts
    5k Views
    R
    you should add [SOLVED] to your thread title then
  • ItemView (QListView)

    8
    0 Votes
    8 Posts
    4k Views
    A
    Please take note that there are trade-offs with all of the possible approaches. QML isn't perfect either, but it might be enough for you. I cannot make that judgement for you.
  • How to write to database (MySQL)

    5
    0 Votes
    5 Posts
    3k Views
    C
    Just one little sidenote to the subject. I've recently went through the description of QSql classes and it says that the underlying database engine must support transactions to use rollBack() and commit() features. Most of them does, I just want to note it to anybody how reads the topic later. ;)
  • Problem with TextEdit

    18
    0 Votes
    18 Posts
    6k Views
    A
    You need to come up with an asyncronous design. A design that allows to return to the event loop after each time you add output to your text edit. If you just move the loop to another function, nothing has changed. Basically, instead of polling continuiously if there is new data to display, you need to switch to a design where either only poll at a specific interval, or much better, don't poll at all but react to a signal, event or interupt or something like that as the data actually comes in.
  • Doesn't see MSVC compile option in Qt creator.

    4
    0 Votes
    4 Posts
    2k Views
    S
    Thanks guys.Never mind.It was a stupid thing.I had to check MSVC 2010 checkbox in install dialog.It is just strange it is not marked by default .
  • Displaying help text when the mouse is over pushbutton and lineedit

    17
    0 Votes
    17 Posts
    35k Views
    R
    event() is called automatically whenever any event occurs(like a key or mouse-button press,mouse move, etc.)... you don't have to call it... what the code does is that on the toolButton press, it activates the What's This? mode, then, it overrides the cursor so that the red circle is not shown... the event() function checks to see if an event is a mouse-release event and the What's This? mode is active...if not, it simply passes it on to its parent for normal processing...otherwise, it restores the cursor to its normal form and then passes it on for normal processing... P.S. - you should change this: [quote author="raaghuu" date="1340706879"] @ myClass::onToolButtonClcked(...) //...this is the SLOT for the helpButton clicked() SIGNAL { setOverrideCursor(Qt::WhatsThisCursor); QWhatsThis::enterWhatsThisMode(); } @ [/quote] to this: @ myClass::onToolButtonClcked(...) //...this is the SLOT for the helpButton clicked() SIGNAL { QWhatsThis::enterWhatsThisMode(); setOverrideCursor(Qt::WhatsThisCursor); } @
  • Debugger for Windows Binaries

    5
    0 Votes
    5 Posts
    3k Views
    T
    [quote author="Tobias Hunger" date="1340738780"]Just ignore tucnak... gdb most likely does not even apply to your problem. So which Qt version are you using to build your project with? Check the Projects mode (bar on the left side), it should show the Qt version used. Which ABI is it using? Click on "Manage" and find the Qt version you are using in the dialog that will open and hover it to get the tool tip. Is the ABI mentioning "msvcSOMEVERSION" somewhere? If it does then you will indeed need cdb for debugging. If it says "mingw" then you will need gdb instead. Sorry, but C++ development on windows is a real mess. No idea what Microsoft is thinking. Once you are sure which debugger you actually need, please make sure that it is available. Prefer the gdb that we ship with Qt Creator to the one from mingw if you have any... ours is known to work, which we can unfortunately not claim for others. If you can start debugging an application even in spite of the messages and it is just breakpoints that are not hit: Did you build in debug mode? Release mode does not have the information needed to place breakpoints based on lines.[/quote] Sorry for wrong comment. I've thought that here was another problem. Now, I will read full thread before posting.
  • 1.1 - 1.1 != 0 ???

    12
    0 Votes
    12 Posts
    6k Views
    L
    Thank you for those interesting reads and sharing them here!
  • [QT-BUG FOUND] KDE QFileDialog under Gnome

    9
    0 Votes
    9 Posts
    3k Views
    T
    tucnak: Just ask them to file a bug report and tag this post with the idea and please don't send people of on fools errands like "prepend to your thread's title - [QT-BUG-FOUND]". That is no help to anybody.
  • Qt 4.8.2 sources went 404

    3
    0 Votes
    3 Posts
    2k Views
    K
    Oh, I figured out why it went 404, it was because of my HTTPS Everywhere extension. Apparently, the downloads don't work with https.
  • QSortProxyModel dynamicSortFilter Problem

    3
    0 Votes
    3 Posts
    5k Views
    N
    yep and in this order @ live_contacts_->setSourceModel(unsorted_contacts_.get()); live_contacts_->sort(0, Qt::AscendingOrder); live_contacts_->setDynamicSortFilter(true); @ Also once the dataChanged signal is emitted if i call invalidate() on the proxy model it behaves as expected after that.