Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 458.0k Posts
  • Socket

    2
    0 Votes
    2 Posts
    1k Views
    M
    Hi, looks like some detail is need to help you out, got some example code? Also please change the subject to something that better describes your issue.
  • Further "Plumbing" for Model->View->Delegate...

    8
    0 Votes
    8 Posts
    4k Views
    A
    My point was, that if you think you have reimplemented a virtual function like paintEvent, but you forgot the const at the end, you can wait for along time for it to get called :-) Your application will simply use the version in the baseclass you subclassed.
  • Add a really huge widget to a QScrollArea

    4
    0 Votes
    4 Posts
    3k Views
    A
    You can base your widget of QAbstractScrollArea. That class provides you with the framework of a scrollable area. You can use the scroll bars directly to calculate the offset you need.
  • Position QGraphicsItem

    2
    0 Votes
    2 Posts
    2k Views
    ?
    @ item->setPos(x,y); @ should do the trick you could refer to some of the demos/examples that ship with Qt SDK for better understanding of QGraphicsView Framework
  • QPixmap load from raw RGB data (from libvlc)

    3
    0 Votes
    3 Posts
    7k Views
    M
    Thanks! I'm actually developing on a Windows machine and I'd like to have something cross-platform.
  • Credit Card Tracker

    5
    0 Votes
    5 Posts
    3k Views
    G
    This all is pretty basic stuff. Just read the introduction tutorials on Qt or get you some book about Qt. Search the forums here or the web, the number of pages listing the links for you are not far from infinity. I'm pretty sure there is even someone listing this stuff on his facebook page. We will not do the homework for you - and reading the docs is part of that. PS: Don't expect any reasonable answer if you force people to setup a facebook account to understand your problem. PPS: And adjust the topic of your post please. Your question does not have to do anything with credit card trackers at all. If you want your questions to be answered, then think about asking smart questions and do not just do a braindump on your keyboard.
  • Capture user active window and browser tabs

    4
    0 Votes
    4 Posts
    2k Views
    A
    I think I misunderstood your question at first. You want to track what people are doing in their browsers, not in a Qt application. I am sorry, I thought you wanted to instrument a Qt based application. Well, the fact that the application you mention does this, implies that it is possible to do. Think however that the application uses platform specific functionality to do it. That is: while the application uses Qt, for this specific functionality, they probably use the windows API's. No part of Qt that I know of has this kind of functionality by default.
  • Changing column order in a QTableView?

    12
    0 Votes
    12 Posts
    17k Views
    A
    I can imagine the swap did not work between column 100 and 300, in any way :-)
  • Multithreaded server

    3
    0 Votes
    3 Posts
    3k Views
    S
    Thanks mate, worked like a charm. For anyone having the same problem in the future, this is how i solved the problem: I made a class that made all the work(wich "lives" in the thread) and then run method of the class looks like @void Thread::run() { client = new Wrapped(); while(client->isAlive) { sleep(1000); // depending on OS } }@
  • Serialize QObject to QString

    17
    0 Votes
    17 Posts
    13k Views
    G
    [quote author="ZapB" date="1300573424"]I think it requires access to QObjectPrivate as this is ultimately what maintains the connection list. So I don't think it is possible to get to it with public API (unless I have overlooked something which is certainly possible). [/quote] Hi ZapB, you are right, it's only possible by usage of this class, but it is possible. There is no public API for that. And I think, usually you don't meed such things. [quote author="ZapB" date="1300573424"] You could hack something yourself by using a wrapper function around QObject::connect() where the wrapper maintains a connection list that you can access and still calls the actual QObject::connect.[/quote] This would make it even more complex, as mostly you just call connect, without the scope in front. Sou would have to do that for all classes you create.
  • Artefacts in QImage on Mac OS X

    2
    0 Votes
    2 Posts
    3k Views
    T
    The first step to get a bug fixed would of course be to report it in the "Qt bug tracker":http://bugreports.qt.nokia.com/. Some sample application or test case is always appreciated as it makes working on the issue so much easier.
  • [Solved] Restrict the movement of QGraphicsItem

    5
    0 Votes
    5 Posts
    5k Views
    T
    Well, I first add the next atribute: @QPointF oldPosition@ I reimplemented a QGraphicsItem::mousePressEvent() and QGraphicsItem::itemChange(), like the example say.eimplemented a QGraphicsItem::mousePressEvent() and QGraphicsItem::itemChange(), like example say. @void Node::mousePressEvent(QGraphicsSceneMouseEvent *event) { oldPoint = pos(); update(); QGraphicsItem::mousePressEvent(event); } QVariant Node::itemChange(GraphicsItemChange change, const QVariant &value) { QPointF newPoint = value.toPointF(); if (change == ItemPositionChange && scene()) { if (newPoint.y() != oldPoint.y()) newPoint.setY(oldPoint.y()); return newPoint; } return QGraphicsItem::itemChange(change, value); }@ Thanks.
  • Anatomy of a Qt "Buddy List" - Am I on the right track architecturally?

    6
    0 Votes
    6 Posts
    3k Views
    Z
    Yes that is what I was trying to get at. Many people still seem to think that it must be all QML or nothing whereas of course as you know it is perfectly possible to mix and match as needed.
  • Windows Binaries

    5
    0 Votes
    5 Posts
    3k Views
    Z
    Indeed. I am actually still on MSVC2005 plus SPs since my company won't upgrade us yet. I am happy to simply build Qt for my toolchain though. It's only a one off for each release and I can set exactly the configure options that I like. So if your exact combination is not released pre-compiled, just build it yourself.
  • Problem, How do I return my own QObject derived custom class as "QVariant"?

    12
    0 Votes
    12 Posts
    10k Views
    Z
    Agreed. The compiler should complain about a lack of a public QObject copy constructor (assuming that you call the base class copy ctor in your overridden one). Never try to copy QObject's around. What happens to the parent for example ie who owns the new object?
  • Preventing flicker of moving images

    4
    0 Votes
    4 Posts
    6k Views
    G
    [quote author="unclewerner" date="1300355917"]Only two hints: Try QPropertyAnimation and drawing to QGLWidget. Hope it helps.[/quote] I just tried using QPropertyAnimation and I still saw about the same amount of flickering and tearing. That was just on a regular old QLabel widget with a pixmap though. Should I be using it in conjunction with QGraphicsItems or something? I'm wondering how that's different from QGraphicsItemAnimation. About QGLWidget, I just tried using one of these as my viewport, and for some reason it looked even worse. I'm wondering to what degree, if any, this is hardware/OS/driver/whatever dependent? I'm on Ubuntu, and I'm wondering if it has weaker support for OpenGL? (I'm really not familiar with lower-levelish stuff, so that may be a stupid question) [quote author="ness522" date="1300359025"]Did you try to force display updates ? I had the problem in my graphicsview, I display there a graphs that updates on a slider movement somewhere else in the GUI. I remember I sometime had to do some tricks to get it smooth, it seems Qt only refresh a few time if you don't force it. try something similar to "graphicsview->Viewport()->update().[/quote] I think I'm able to control this through setUpdateInterval on the QTimeLine I'm using to control my animations. I've tried following the conventional wisdom of having an update interval of ~17 ms to match monitor refresh rates. Thank you guys so much for the tips. At this point, I'm happy to have anything at all to go on.
  • Problem using stdout in QProcess

    8
    0 Votes
    8 Posts
    5k Views
    V
    All, thank you very much. I am out of the office now, will test this soon. Sure it works.
  • How to draw 3d line(x,y,z)

    5
    0 Votes
    5 Posts
    21k Views
    Z
    No problem. Good luck with OpenGL it is good fun although it can be confusing and frustrating to start with when you spend a long time coding something only to be presented with an empty window ;-)
  • QLCDNumber fixed width for numbers

    3
    0 Votes
    3 Posts
    6k Views
    B
    Thanks for the tip! It works OK, I have used QString::sprintf() for formatting, and then transfered the QString to the QLCDNumber :)
  • [Solved] "Lock" the UI while waiting on an async event?

    22
    0 Votes
    22 Posts
    19k Views
    R
    So can you only consume MousePress but not MouseRelease? Well, the text box cursors move on mouse presses and the popup menu appears on mouse release (in a text box) - so somehow text boxes are getting around the mouse event filter. I can't even guess at the button behavior, but it must somehow still knows you're clicking on it too.