跳到內容

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k 主題 456.4k 貼文
  • What is QtitanMultimedia

    2
    0 評價
    2 貼文
    905 瀏覽
    M
    There is an overview of the product at "this link.":http://www.devmachines.com/qtitanmultimedia-overview.html To use these classes, you need to purchase a license from Developer Machines, though I believe they have a free trial available.
  • How to clone a project ?

    3
    0 評價
    3 貼文
    3k 瀏覽
    T
    The preferred way is of course to create a fresh checkout from your version control system. With distributed version control systems like git, bazaar and mercurial (all supported by creator) you do not even need to set up a server somewhere! You should be using one, even if you work alone!
  • Cannot disconnect server child client

    1
    0 評價
    1 貼文
    1k 瀏覽
    尚無回覆
  • CloseEvent problem for early closures and a lenghthy constructor

    2
    0 評價
    2 貼文
    1k 瀏覽
    B
    What exactly is the problem with that? What are you doing in your constructor? Did you try to block the signals until it is finished?
  • QNetworkAccessManager QMultiPartData post upload a file causing my application to crash..

    7
    0 評價
    7 貼文
    6k 瀏覽
    D
    My issue is not related to what you say since my network manager is a member a class in my code and is not declared on the stack the issue is a Bug in QT 4.8.1 which as been resolved in 4.8.3. Plus me the code wasn't just not sending signals or slots it complety crashed my application. [quote author="okachobi" date="1350329767"]I arrives at this post while searching for a problem I was having with QHttpMultiPart not working. It simply was not making the post and never calling any of the signal handlers. I have since figured out the problem, and wanted to drop some breadcrumbs here for anyone else who is in a similar situation. The code snipped in the 4.8 QT manual will not work if cut and paste into a method. It mentions connecting the signals to your slots at the end as if the author of the snippet intended for it to be used in an event driven app, but they declared a local QNetworkAccessManager that will fall out of scope if a method returns and it will never complete the post. They even reparented the file and the multipart objects as if it was a snippet ready to be pasted into a method. It took me forever to find this problem because those things were misleading. Indeed, the QNetworkAccessManager should be allocated dynamically and parented to your own class so as not to fall out of scope. In the code snippet, it is declared on the heap and would delete itself after you setup the signals and return. You must allocate it dynamically and parent it to your own object, or make it a member variable that you manage. Do not use the declaration as it is written. I can't imagine how they arrived at the code snippet in the documentation unless it was a console application that busy-wait polled the status of the reply, but then they wouldn't have suggested connecting to signals to your own slots, so its very misleading. [/quote]
  • Detect end of movement of QMainWindow / QDialog (Qt 4.8)

    12
    0 評價
    12 貼文
    7k 瀏覽
    T
    I finally made it with the timer, not the smoothest solution in this world, but it works. In this example I have to reposition the widget if it lays across multiple screens at the end of the movement. @ #include "STMultiScreenMovementManager.h" #include <QDesktopWidget> /** Constructor. @param parent: Widget under control. / STMultiScreenMovementManager::STMultiScreenMovementManager(QWidget parent) : QObject() { this->parent = parent; timer = new QTimer(this); QObject::connect(timer, SIGNAL(timeout()),this,SLOT(adjustPosition())); } STMultiScreenMovementManager::~STMultiScreenMovementManager() { DELETE_P(timer) } /** Called by the moveEvent in the parent widget. */ void STMultiScreenMovementManager::notifyMovement(){ if(!timer->isActive() && intersectsScreenBounds()){ timer->start(100); } } /** Called upon timeout: it adjusts the widget position if the current one is not permitted. / void STMultiScreenMovementManager::adjustPosition(){ QDesktopWidget dw = QApplication::desktop(); QPoint endingPos = calculateEndingPosition(); if(parent->pos() == endingPos || dw->screenGeometry(parent).contains(parent->frameGeometry())){ timer->stop(); }else{ parent->move(endingPos); } } /** This method calculates the nearest right position for the widget. */ QPoint STMultiScreenMovementManager::calculateEndingPosition(){ [........] return endingPos; } /** This is used to find out if the widget is laying across multiple screens. */ bool STMultiScreenMovementManager::intersectsScreenBounds(){ [......] return true/false } @
  • How to update a QTableWidget row by row

    3
    0 評價
    3 貼文
    3k 瀏覽
    M
    Glad you figured it out! Be sure and add [Solved] to your thread title in the initial post. Thanks!
  • Filter filename in QDialog

    14
    0 評價
    14 貼文
    6k 瀏覽
    B
    AFAIK and without RTFM the name of the actual file (project1.cst) or the pattern (*.exe) must be enclosed by brackets.
  • How to set the width of a column on QTableWidget

    4
    0 評價
    4 貼文
    10k 瀏覽
    G
    thanks for your interest in this matter @qxoz.
  • [solved] parentwidget problem

    3
    0 評價
    3 貼文
    1k 瀏覽
    B
    Sorry, my fault was :) I put into the child wrong class type...
  • Stl search equivalent

    5
    0 評價
    5 貼文
    2k 瀏覽
    B
    indexOf of QString isn't good? @ QString str = "We must be <b>bold</b>, very <b>bold</b>"; int j = 0; while ((j = str.indexOf("<b>", j)) != -1) { qDebug() << "Found <b> tag at index position" << j; ++j; } @
  • Beginners: how to loop qphraphicsobjects in a scene

    6
    0 評價
    6 貼文
    2k 瀏覽
    U
    Yes that is possible too, only it is on instance level instead of class level. It saves on creating your own hierarchy thou. I am not sure if it will end up using more memory than just having a method that returns a hard-coded enum value.
  • Command Line Application with qmake in MacOSX?

    3
    0 評價
    3 貼文
    2k 瀏覽
    K
    Thank's a lot! :)
  • Circular buffer model

    5
    0 評價
    5 貼文
    8k 瀏覽
    S
    Ok that clears things up a bit. I did figure that the beingRemove/endRemove stuff was a protection mechanism, but I didn't realise it would always (at least in my case) cause a dataChanged to be emitted for the entire model. I had sort of thought that the redrawing would be smarter when using the more precise insert/remove operations rather than the more blunt beginResetModel/endResetModel, although I can see in this case that when you remove the first item(s) all other item's indexes are changed. Is it possible to have a model which doesn't have it's indexes starting at 0, so after the buffer is filled, on the next insertion, a new item would be added with an index one larger than the current last item, and all of the other indexes would remain the same, but there would no longer be an index 0? I didn't quite follow this comment bq. You might want to use the QTextEdit to display a number of lines. If the number of lines get to big set the overwrite function and set the insertion position back to 0? are you talking about a different way of implementing this, because at the moment, I have a fixed size fifo, so the number of lines will increase to the size of the fifo then remain constant. At any rate, I've fixed some bugs in my code and it does work correctly inserting rows until full, then doing a remove followed by an insert once full. Once the buffer is full, on a removal I take note of the top visible item, and adjust it for the number of lines being removed/inserted, and then use QTableView::scrollTo to ensure it is still the top item after the insertions are complete. This is a bit messy, but achieves the effect I desired. I guess this is the scenario which could be optimised though, where all the data on screen is unchanged, but will get redrawn on an insertion. I think it's an interesting problem too, which is why I'm keen to discuss it. Thanks again for your thoughts on the topic.
  • [Solved] Bouncing Tray Icon at Program Start

    12
    0 評價
    12 貼文
    5k 瀏覽
    H
    Even though this problem has been solved a long time ago I'd like to add that you can refresh Finder's view on .app-folders (including options set in the Info.plist) by executing touch on the .app-folder.
  • [SOLVED] C commandline-application without X11

    3
    0 評價
    3 貼文
    1k 瀏覽
    H
    Its without Qt (CONFIG -= qt) but I still don't get what X11 has to do with it. EDIT: My bad...it was just the debug-window.
  • Qt Threading Issues in Linux

    3
    0 評價
    3 貼文
    3k 瀏覽
    A
    I believe he was trying the demo from: blog.qt.digia.com/2011/06/03/threaded-opengl-in-4-8 and it looks like the QTextWidget is being added from the main thread (from the line number he gave). I've tried the demo that Qt released, and it works fine on my mac with the added QTextWidget, so maybe it's an X11 bug?
  • List of tranlatros in QApplication

    6
    0 評價
    6 貼文
    2k 瀏覽
    M
    Keeping track of them yourself would be the easiest thing. Otherwise you have to dig down into the internals of QCoreApplication/QCoreApplicationPrivate where the translators list is deeply hidden. (The sources are there to view, if you are curious, though.)
  • I STRONGLY NEED to know slot where signal is connected to.

    32
    0 評價
    32 貼文
    31k 瀏覽
    A
    [quote author="ZapB" date="1348564437"]You may want to have a look at the GammaRay... It can be found on git hub at https://github.com/KDAB/GammaRay[/quote] Wow this look absolutely awesome! Definitely worth the try!
  • Generic progress reporting system design

    1
    0 評價
    1 貼文
    1k 瀏覽
    尚無回覆