Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • [closed] knowing screen coordinate .

    Locked
    5
    0 Votes
    5 Posts
    2k Views
    A
    Closing this topic, due to duplication with "second topic":/forums/viewthread/18626/ of BibekKumar
  • 0 Votes
    5 Posts
    2k Views
    M
    Please be sure and edit the thread title to add [Solved]. Thanks!
  • [Solved] Flip a QGraphicsSvgItem on its center point

    6
    0 Votes
    6 Posts
    7k Views
    A
    Ah, the way I remember it, you have to read combined transform operations from the last operation to the first. That is, the item is first translated (last operation) so it's center is exactly where the parent's center is (in this case, the top/left of the scene). Then it is scaled. Because it's centered, it's scaled in all directions at the same rate. And finally (first operation), you have to move it back where it belongs.
  • Deploying an application containing database

    12
    1 Votes
    12 Posts
    5k Views
    A
    [quote author="nil_sunil" date="1341839770"]can we create dsn dynamically using qt code .. bcoz i'm using my sql server as database in my application and i create dsn mannually .. bt wen i distribute my app it will not find dsn .. unless i create dsn in every machine where i distribute my app .. can anyone help me in solving my prob ??[/quote] Merged with your previous topic. Please don't start multiple topics on the same issue.
  • QListWidget, QListWidgetItem and checked() signal.

    5
    0 Votes
    5 Posts
    8k Views
    A
    Or you just use "libqxt":http://libqxt.bitbucket.org/doc/0.6/qxtlistwidget.html which just has a signal for it.
  • QPainter::drawText consumes a lot of memory

    8
    0 Votes
    8 Posts
    5k Views
    W
    Thanks for your input.
  • [SOLVED] - QIODevice readyread() not raised

    2
    0 Votes
    2 Posts
    4k Views
    S
    Well... It seems to works again (and I didn't do anything...) So I bet it is the software I use to simulate COM ports, DAMN MONDAYS !
  • Add widget of another process

    5
    0 Votes
    5 Posts
    3k Views
    W
    Thanks Andre, i finally give up on this, it seems to me impossible to get the component rendered including the focus.
  • How can i integrate Qt VS Addin with VS Configuration Manager

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Custom network download intermrrent failures

    3
    0 Votes
    3 Posts
    2k Views
    P
    Problem solved. I had to create two QMovie objects and alternate there use. Several people locally to me expressesd interest in my solution. Rather than send out an email to each perrson I posted my solution as "Using Qt to display a WEB animated gif":http://getoddnews.com/2012/07/08/using-qt-to-display-a-web-animated-gif/ on my website for them and anyone else who may be interested.
  • How to play an audio-cd with Phonon?

    2
    0 Votes
    2 Posts
    2k Views
    M
    Ok, I think I have solved this issue. Currently I have code like this: @ Phonon::MediaObject *myMusic = Phonon::createPlayer(Phonon::MusicCategory,Phonon::MediaSource Phonon::Cd, QString("E:\"))); Phonon::MediaController myMediaController(myMusic); myMediaController.setAutoplayTitles(true); myMediaController.setCurrentTitle(7); myMusic->play(); @ "E:" is my cd-drive with inserted audio cd and I play the track #8 (track count starts from zero). Other issue on my Windows 7 system was Phonon warning: @unable to load the TOC from the CD@ This issue is related to Phonon Windows backend. Some Windows systems do not have CDDA codecs (or what is that thing is) installed. In this case Phonon application will not play Audio CD discs. You won't see any errors (except from above) and there won't be any cd drive activity. To fix this issue you should: Dowload proper cddareader.ax for your system (I used one from MPC HomeCinema Standalone Filters on http://sourceforge.net/projects/mpc-hc/files/) Open command line and execute regsvr32.exe cddareader.ax Reboot This code is tested on WinXP x86 and Win7 x64. Linux machine have played audio cd without problems (with different path of cource) Hope this information will be useful
  • 0 Votes
    4 Posts
    5k Views
    U
    Perspective in 2d? No such thing! ;) You can easily use 3 points as well, but it is overkill and unnecessary - you still can create a triangle and follow its transformations and apply those to the scene but it just adds to the complexity without adding any actual value. You can do it for the sake of doing it thou, you can use the area or perimeter/circumference of the triangle for scale and its orientation for rotation, but the latter you will still have to reduce to a line, i.e. follow the rotation of the triangle's height.
  • Edit vector elements when QListWidget Item is edited

    3
    0 Votes
    3 Posts
    2k Views
    C
    I am not familiar with MVC, it seems comprehensive study necessary for learn it. So i found temporary solution for this project. Thanks for your answer.
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • What is this widget? Is it available for Qt?

    6
    0 Votes
    6 Posts
    3k Views
    T
    Hi, ~Leon! Qt doesn't have this widget in defaults, but it's very simple to implement it on your own! I will do it in this way. In switcher - create horizontal layout. Create QLabel and set it's style via QSS. Move it in layout.
  • Insert new rows into database using QSqlTableModel

    10
    0 Votes
    10 Posts
    27k Views
    F
    Wilk, this is what I mentioned above. But it depends on the application someone wants to deploy. However, I don't think that it makes sense using multithreaded insertion into a database in general. Since nearly everything is possible in coder's world ('beam me up' not yet) it should be clear what the user wants to enter and how - not inverse - looking at what Qt does and then decide what the user has to do. Besides, the example DB does only have one integer key.
  • EventFilter Print Screen key?

    2
    0 Votes
    2 Posts
    4k Views
    T
    Hi, ~jnewing! Problem not in you - problem is in OS'es. They are not allowing to catch PrintScreen key press event. But there are a few solutions specified for systems' API's
  • [SOLVED] Awful flickering with QGridLayout on Mac OS X

    2
    0 Votes
    2 Posts
    2k Views
    A
    See http://www.qtcentre.org/threads/49840-Awful-flickering-with-QGridLayout-on-Mac-OS-X?p=223935#post223935 for the 'solution'...
  • 0 Votes
    3 Posts
    2k Views
    P
    Phil, It appears that there is a bug with query.next() using ODBC in Mac OS X. The bug report for 4.8.0 with a temporary work around is here: https://bugreports.qt-project.org/browse/QTBUG-25260 I know that this bug still exists in 4.8.1, but I've not looked at 4.8.2's source so I can't verify. Hopefully this bug is fixed in Qt 5.0. I had to recompile the ODBC sql driver plugin from source making the modifications suggested in the work around in qsql_odbc.cpp in the QODBCResult::fetchNext() function on line 1043. The class file, qsql_odbc.cpp, can be found at /Users/[you]/QtSources/4.8.[x]/src/sql/drivers/odbc/qsql_odbc.cpp. Note: If you downloaded the source outside of Qt Creator, you'll need to browse to where you extracted the source. This applies to all paths supplied in this post. I commented out the conditional part, beginning on line 1033, where SQLFetchScroll is called so that it looks like this: @// if (d->hasSQLFetchScroll) // r = SQLFetchScroll(d->hStmt, // SQL_FETCH_NEXT, // 0); // else r = SQLFetch(d->hStmt);@ Then I opened up /Users/you/QtSources/4.8.x/src/plugins/sqldrivers/odbc/odbc.pro within Qt Creator and built the source. The outputted dylibs are put in the sqldrivers directory in their respective release and debug folders. When building the plugin, it's very important that you use the correct version of Qt to build. For instance, if you're targeting Qt 4.8.2, make sure you have Qt 4.8.2 configured in your Qt versions from Qt Creator. After you build the ODBC plugin, you're ready to replace your Qt installation's dylibs with the newly built dylibs. First, make a back up of libqsqlodbc.dylib and libqsqlodbc_debug.dylib from your Qt installation. This is typically in /Users/you/QtSDK/Desktop/Qt/4.8.x/gcc/plugins/sqldrivers. Then you can overwrite your Qt installation's dylibs. Now you should be able to get results from query.next() within your application.
  • Noob Q: Deconstructing a larger a app

    4
    0 Votes
    4 Posts
    2k Views
    D
    My five cents: I, too, come from a similar background (Quantum physics), so I'm not a software developer by profession. My way of getting a grip of those things was to go to the computer science area of our university library and read books that seemed useful for such purposes, including the big design pattern book by the "Gang of four" ("Design Patterns: Elements of Reusable Object-Oriented Software"). They don't explain large scale application development itself, but teach you certain non-adhoc ways of solving recurring problems (what's called a "pattern"). Some of those patterns are essential because they form a well-known basis for your approaches to certain problems. This way other Programmers also familiar with the patterns will have an easier time understanding your code – equally you will need some of the patterns to understand their code. This is something small applications don't necessarily need, because the code is small enough to not fall apart in spite of adhoc-solutions. Although I've read many other advanced software development books here and there, because I, too am fascinated by how large software projects can possibly work, I'm afraid I know none of them from the top of my head (the content is always more interesting than the title you know ;). Getting into this topic was a rather inefficient process for me, so I never sat down with a serious curriculum and worked through the material. I just got it bit by bit. (Oh yeah, don't get me wrong, I'd never consider myself a professional large scale software developer. For that you'll need to do it as a job and think about this stuff for eight hours a day for ten years.) Further, some very useful information can be distilled from coding guides of large projects. See google's coding rules or the ones of Qt and KDE. And nothing's worth more than failing. Start writing your geophysics application. Maybe it works out great, then you're happy. Maybe it falls apart or becomes inflexible. Then you start over, know your design mistake, do it better. Then you're happy, too. :)