Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • 0 Votes
    10 Posts
    8k Views
    T
    Yes, usually you have a worker thread that does something (interact with the network, calculate something, etc.) and have it signal updates to the UI thread (incl. required information if copying them is not too costly or otherwise some handle to retrieve the relevant data) and then have it update the UI accordingly. This is "fire and forget": The worker fires a signal and then proceeds as normal. The receiver is responsible for making sure it is acted upon. There is no need to block the worker thread while the UI is updated. Of course you only signal when something actually happened. If you need to block the worker thread because you need feedback from the UI which can't be done via signals emited by the UI thread then you might be better of not have a worker thread in the first place. You can always use event-driven programming to asynchronously process network requests, etc. which will also keep your UI responsive.
  • SIGNAL(triggered()) is not respond

    5
    0 Votes
    5 Posts
    4k Views
    H
    You just saving me! Thanks you =)
  • Adding custom widgets to QTableWidget

    4
    0 Votes
    4 Posts
    11k Views
    S
    @QWidget *widget = this->taskListTableView->cellWidget(row, 1);@ this is not correct, first u initialize your qwidget object like this.... @QWidget *widget =new QWidget(this);@ just try this...
  • Mouseclick and SVG images

    5
    0 Votes
    5 Posts
    5k Views
    S
    wow, thank you very much for the detailed answer! I'll look into it.
  • QGLWidget incorrectly scales image in ortho mode

    2
    0 Votes
    2 Posts
    2k Views
    T
    Hey there, I think you need to use shaders and anti-aliasing to avoid such distortion. Such simple code doesn't produce clear objects. Notice that in the original texture you have a very obvious gradient in the colours. If you wan't to be sure that this is the cause of the problem, resize your window so that you could make it fill the screen and use more than 1000x800 pixels. If you find this problem only on the edges of the objects, then you need to use, as I said, some filtering for the scene. I think you gotta have a good OpenGL course to get over this and understand how to deal with 3D objects being sampled. Many courses are available online. Regards.
  • QSyntaxHighligher and QTextBlockUserData storage

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • How to track pointer when is passing trough a button?

    4
    0 Votes
    4 Posts
    2k Views
    A
    I think you are looking for monitoring the [[doc:QHoverEvent]].
  • Problem with Qmetaobject::invokeMethod

    4
    0 Votes
    4 Posts
    3k Views
    G
    Is this question by any means related to "this thread":/forums/viewthread/14623/?
  • 0 Votes
    5 Posts
    3k Views
    L
    Thanks for the insight! Im current trying to figure out why my app goes boom (newbie programmer) and I did not realize that about QMetaObject::InvokeMethod.
  • Google Summer of Code 2012

    2
    0 Votes
    2 Posts
    2k Views
    sierdzioS
    I think the list for this year is still not published. Last year, there definitely was a lot of projects available from KDE, I think VLC was also in.
  • Some help with .qss editting.

    2
    0 Votes
    2 Posts
    3k Views
    S
    Maybe I should clarify a bit. I'm making my dropdowns so they mouseover a dark red fading to transparent, white text, and a black background. Now the problem I'm having is the black background part isn't working. The white text, red fade to transparent works, just.. No black. I've tried hex colors, black background image, none of it's working..
  • Subclassed QSortFilterProxyModel doesn't forward dataChanged signal

    2
    0 Votes
    2 Posts
    5k Views
    D
    Ha! It's always the things that "are correct for sure" that bite you! Turns out just printing "Yey!" wasn't so smart, the parameters I passed to dataChanged were wrong and so the filter proxy didn't let the signal through. I emitted like this: @emit dataChanged(index(id, 0), index(id, columnCount()));@ When I should have emitted @emit dataChanged(index(id, 0), index(id, columnCount()-1));@ Obviously ;) Sadly this "column out of bounds" situation doesn't produce any qDebug output in the model or view, but is silently turned into column id -1 and row id 0 (!). Sneaky.
  • How can we restrict mouse move event to get propagated to child widget?

    3
    0 Votes
    3 Posts
    3k Views
    S
    You can set the eventFilter for the child widget to the parent, and filter out the event.
  • Pyqt QToolbox click event

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • [Solved] Specifying a font using CSS

    2
    0 Votes
    2 Posts
    1k Views
    M
    You need to backslash escape " your quotes around the font name, perhaps?
  • Add Qt code to browsers (Firefox, Opera,...)

    12
    0 Votes
    12 Posts
    5k Views
    ?
    I have noticed that myself, some people simply cannot figure out what to look for, I myself googled "firefox extension api c++" - API stands for Application Programming Interface. I suggest you work on your English parallel on your programming, since English is kind of crucial - most programming resources are in English. Good luck with your extension.
  • [SOLVED] Functionality similar to C#'s Backup.SqlBackup()

    3
    0 Votes
    3 Posts
    2k Views
    D
    Thanks Volker for your answer. I'm trying to create this backup using osql.exe application that is delivered with MSDE2000 and QProcess. Here's the code snippet: @ QProcess *dbBackupProcess = new QProcess(); QStringList args; args << "-Uuser" << "-Ppassword" << "-Sdomain\SQLinstance" << "-Q "BACKUP DATABASE dbName TO DISK = 'E:\backupName.bak'""; dbBackupProcess->start("osql.exe", args); @ This unfortunately doesn't work. What am I doing wrong? Below command ran from the command prompt works good: @osql.exe -Uuser -Ppassword -Sdomain\SQLinstance -Q "BACKUP DATABASE dbName TO DISK = 'E:\backupName.bak'"@ Edit: Okay, never mind. I'm finally getting somewhere. Will post an update soon. Edit#2: I guess I solved it: @ QString command = "osql.exe -UuserName -Ppassword -Sdomain\SQLinstance -Q "BACKUP DATABASE dbName TO DISK = 'E:\backupName.bak'""; int exitCode = QProcess::execute(command); @
  • 0 Votes
    4 Posts
    2k Views
    D
    Thanks; the argc reference was indeed the case - missed it.
  • Undefined reference wheh using QScriptEngine and QScriptValues.

    3
    0 Votes
    3 Posts
    4k Views
    J
    Thanks. You save my day.
  • 0 Votes
    3 Posts
    3k Views
    M
    Even i tried with all exitstatus, but no luck. Finally i have used a batch file with WMIC command inside the batch file. now its working fine. @ QProcess *process = new QProcess(); process->start( "executer.bat" ); // which contains WMIC Path Win32_COMPUTERSYSTEM get Manufacturer,Model /FORMAT:list process->closeWriteChannel(); if( process->waitForFinished() ) { qDebug() << "Succeed: "; QString sResult = QString( process->readAllStandardOutput() ).trimmed(); process->close(); if( !sResult.isEmpty() ) return sResult.split("\n"); } else { qDebug() << "Failed: " << process->errorString(); process->close(); return QStringList(); } @