Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Static compilation licensing issues?

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    A
    Please refer to one of the many discussions on that exist already.
  • Video playback on Windows and Mac

    3
    1 Votes
    3 Posts
    3k Views
    G
    Thank you for the post Chuck! Which codec would you suggest for mp4? (sorry if this is a very noob-ish question, I am very new to all things video related) I decided at this stage it is best to go with MultiMediaKit. I don't really want to invest the time into a library that is about to be deprecated, and MultiMediaKit doesn't involve as large a time investment as I first thought. I did some further testing with the divx codec and the code sample shown "here":http://doc.qt.nokia.com/qtmobility-1.1/qmediaplayer.html#details. For this test note that I have 2 windows XP computers setup with Qt. The short version of the test results is that the divx codec allows me to play .avi videos (this is verified against a computer without the divx codec and by a divx watermark that appears for the first few seconds of playback). However I still cannot play divx files using the MultiMediaKit. When I try to do so, I get an error "DirectShowPlayerService::doRender unresolved error code 80040218". I was unable to step through the code to find this error, but may try again later. The next experiment I would like to try is continually polling the backend for supported mimetypes while systematically installing new codecs. I am hoping to see a predictable increase in codec support. I am trying the following code: @ QStringList mimes = QMediaPlayer::supportedMimeTypes(); for (int i=0; i<mimes.count(); i++) ui->mimeList->addItem(mimes.at(i)); // mimeList is a combo box @ Unfortunately I never get any elements in the mimes QStringList. So I cannot run this test. Ultimately I would like to identify a video format that uses a nice safe codec. When the program runs, it will poll the end user's system to see if it supports that specific video format. If that format is not supported it will display a link instructing the user to install the correct codec. This would be easily done using the call: @ QtMultimediaKit::SupportEstimate QMediaPlayer::hasSupport ( const QString & mimeType, const QStringList & codecs, ... ) @ However, since the supportedMimeTypes call isn't working I really don't know what I would pass into this second call. Any suggestions on "safe" codecs I could use, or on what could be preventing the above code from working?
  • Osx environment variables

    5
    0 Votes
    5 Posts
    3k Views
    M
    Ah.. Just noticed the path values I am hoping to find are being set in my .bash_profile; I have should checked there first. Thanks.
  • Javascript inheritance in QT app

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Starting and terminating processes needed by my application

    6
    0 Votes
    6 Posts
    3k Views
    L
    At the end, I came up with a solution which seems to work for the moment. The problem I suppose was related to the fact that the application was terminated before the mydestroy() method ended. This executes the method in the same thread and seems to work better: @QObject::connect(&a, SIGNAL(aboutToQuit()), ProcessHolder::getInstance(), SLOT(mydestroy()), Qt:DirectConnection);@
  • PySide: A Little Help

    5
    0 Votes
    5 Posts
    3k Views
    M
    bq. every object has the a timer inside of himself check for QObject::startTimer() Holy cow! That is embarrassingly shocking. I hate to admit it, but I've been using Qt for about 13 or 14 years now and somehow I've managed to completely miss the existence of that functionality in QObject. (Either that or I'm starting to forget the details of stuff I might have once known but then never used.) Looks like it's been there forever too (it was there in the 2.x docs I have.) Makes me wonder what other stuff I don't know (or have forgotten -- I like that scenario better :-) ). Yikes! Anyway, that does look like a nice viable solution, too. Same setup without the external QTimer.
  • Poor QThread::sleep() and ::usleep() resolution on Windows

    19
    0 Votes
    19 Posts
    29k Views
    D
    [quote author="LinusA" date="1311777241"] [quote author="peppe" date="1311757068"] I still think that using sleep() in any code is usually wrong, and relying on the fact that it's somehow accurate is even more wrong -- noone gives you that guarantee. [/quote] Now this is interesting, could you maybe elaborate or point me to some article etc? Let me describe my problem: I'm doing heavy image processing in a 10ms time "slot", since my cameras are running at 100FPS. Sometimes I finish early, i.e. within 3ms. Now my working thread is idle for 7ms and keeps polling the cameras until a new frame arrives. I'd very much like to not burn CPU during this time, so it would be good to pause the polling for 0.1ms each iteration. Right now I'm back to busy waiting, as I can't afford to to "miss" a frame by some ms. Unfortunately this burns CPU time, which the camera driver's thread could probably use on its own (as it's doing some MJPEG decompressing). If you saw a better design, this would be interesting... Thanks everybody![/quote] Yes, the "usually" was specifically referred to hardware programming. I don't have enough information, but are you sure that you can't switch to a some kind of interrupt-driven design? That is, being notified by the camera that a new frame is available? Otherwise just use a QTimer which has 1ms resolution on pretty much any modern system.
  • 0 Votes
    7 Posts
    4k Views
    Y
    Ok. Thanks for your help.
  • Problem with thread

    4
    0 Votes
    4 Posts
    3k Views
    R
    Many thanks for your, help!
  • [Solved] QTableView - keep 1st column fixed size and non-scrollable

    5
    0 Votes
    5 Posts
    7k Views
    A
    This is the link http://doc.qt.nokia.com/latest/itemviews-frozencolumn.html It worked in my application. Thanks
  • [Solved] How do I create subdirectories in Qt Creator?

    5
    0 Votes
    5 Posts
    9k Views
    A
    [quote author="mlong" date="1311704016"]Edit: Wow. Completely didn't see the last half of your last post (or the [Solved] in the title). I guess I got too excited about figuring out the problem. :-) I need to start getting more sleep, I think. [/quote] Haha, it's fine, I do that quite a bit too at times. :D
  • QInputDialog osx bug?

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [Solved] Passing QByteArray to 3rd party function

    6
    0 Votes
    6 Posts
    6k Views
    F
    Good to see you solved it. Note that you're going to have to take into account the endianness of the system when you type-cast. The QDataStream solution passes that responsibility to Qt. You specify that the file data is stored in little endian format (unsigned short i = 1; memory maps to 0x0100), but if you use this solution on a big endian system (unsigned short i = 1; memmaps to 0x0001) you're going to see weird results all over again. I don't know if you're going to run into this, but take note of it in any case.
  • [Solved] QMessageBox with line edit

    5
    0 Votes
    5 Posts
    13k Views
    K
    Super, thanks!
  • [Solved with a workaround] editable/!editable QCombobox with stylesheets

    9
    0 Votes
    9 Posts
    12k Views
    G
    Finally, I solved this issue with a workaround. My guess is that each time a QComboBox gets the editable state, an internal QLineEdit is created, when it gets not editable the QLineEdit is destroyed (test the lineEdit() function to understand). But each time the QLineEdit is created, the stylesheet is lost, I guess beacause it is not saved in the QComboBox widget. So, my workaround has been to reimplement the setEditable(bool editable) function. When editable is true, I reapply the stylesheet to the QComboBox. The stylesheet is accessible by the styleSheet() function, if it has been applied to the specific widget. Otherwise, if it has been globally applied to the QApplication, it can be accessed by including <QApplication> and calling qApp->styleSheet(). This would be worth to be reported as a bug, but I don't know how to do it.
  • Slots not being called in shared library (Mac)

    2
    0 Votes
    2 Posts
    2k Views
    B
    Update: this all seems to work correctly if I build my own Qt libs from sources...
  • QRegExp, perl and Unicode

    4
    0 Votes
    4 Posts
    3k Views
    D
    Because I'm working in PyQt, libpcre is not available. Python native re support also lacks \p\N and has other Unicode deficiencies. However there is a good extension regex package ("regex":http://pypi.python.org/pypi/regex) with rather complete Unicode support. The difficulty that I see as a [Py]Qt newbie is in working on the one hand with a QPlainTextEditor and text cursor objects, and on the other with Python-based regex matching. Constantly crossing between the world of the editor document and the world of Python u"strings" looks like a very fruitful way to create confusion and mistakes. Comment?
  • [merged] qglwidget and layouts problem?

    18
    0 Votes
    18 Posts
    8k Views
    T
    iv written what QT needs to do a basic 3d graphics render but for some reason i just keep getting errors ??? and these errors are just horrid ones that no one can figure out heres what i put i know theres some dots missing but i really dont understand what the point of it is maybe for digits?? Or something whateva but the point is it wont work no matter how many ways i try to do it even with dots! :( maybe because im placing it within some other code?? but that shouldnt effect it at all if the syntax was correct on this piece of code below, its all very confusing and i really would apperciate it if someone could guide me in the right direction and do it in a detailed way :) so i can learn from it @ class opengl : public QGLWidget { Q_OBJECT public: opengl(QWidget *parent) : QGLWidget(parent) {} protected: void initializeGL() { glClearColor(0.0, 0.0, 0.0, 0.0); glEnable(GL_DEPTH_TEST); } void resizeGL(int w, int h) { glViewport(0, 0, (GLint)w, (GLint)h); glFrustum(); } void paintGL() glRotatef(); glMaterialfv(); glBeing(GL_QUADS); glVertex3f(); glEnd(); }; @
  • QLabel cannot display image on other computer

    5
    0 Votes
    5 Posts
    4k Views
    Z
    I have put the whole imageformats plugin folder, the "imageformats" folder, into the program folder and the problem is solved. Thank you very much. p.s.: The images are arbitrary on the harddisk, not included in src. I used a filedialog in code to find the image files.
  • Parsing input and performance of QRegExp

    4
    0 Votes
    4 Posts
    4k Views
    jensen82J
    tgone.start(); does a reset or not? Anyway the distance between 1st ad 2nd run is to big...a bug?