Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • How can i open persistent editor which itself closed

    2
    0 Votes
    2 Posts
    3k Views
    R
    Sorry for my bad english, i try to explain again: I have QTreeView, when i clicked on the item, standard text editor(QLineEdit) of this item opened. But i want to open this standart editor(or delegate) independently and u try to use QAbstractItemView::openPersistentEditor(), but if i use this slot i must close this editor. How can i get method to open stadart editor that closes itself?
  • Resizing a widget's non-Qt child window after resize

    7
    0 Votes
    7 Posts
    4k Views
    P
    [quote author="Andre" date="1330962444"]No idea, especially because you're not showing any of the relevant code of how you even embed the external widget in your Qt application. Show the relevant portions of the code, and perhaps somebody here can help you.[/quote] Sorry, I thought mentioning SetParent() wouldn't leave much to speculation. Here's how I start the child program and hook up the two windows. @// I omitted the ShellExecuteInfo-block here ShellExecuteEx(&ShExecInfo); HWND childWindow = NULL; uwid = ui.externalDock; uwid->setAttribute(Qt::WA_NativeWindow); WId activeWidget = uwid->effectiveWinId(); //Try finding the child window up to ten times int i, nTries = 10; for (i = 0; childWindow == NULL && i < nTries; i++) { childWindow = FindWindowA("ChildWndClass", "ChildName"); Sleep(200); // Get a handle to the Qt widget serving as the parent window if (activeWidget == NULL || activeWidget == 0 ) { activeWidget = uwid->effectiveWinId(); } } SetWindowLong(childWindow, GWL_STYLE, WS_VISIBLE); MoveWindow(childWindow, 0, 0, uwid->width(), uwid->height(), true); if (childWindow==NULL) { emit log_message("ERROR – could not find Qt parent window."); return; } SetParent(childWindow, activeWidget);@
  • (seemingly) simple Qt app: creating a progress bar

    72
    0 Votes
    72 Posts
    62k Views
    mzimmersM
    No sweat, Volker...I appreciate your help. Would you like a fresh copy of the source code? Mine should be about the same as yours, but...you never know.
  • Connecting selection in QTableView and QGraphicsView

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • QSharedPointer::data() as SIGNAL/SLOT parameter

    7
    0 Votes
    7 Posts
    7k Views
    G
    Thanks Andre. Got a bit confused.
  • Placing template in a QByteArray

    5
    0 Votes
    5 Posts
    2k Views
    A
    So... how did you declare and implement your QDataStream operator overloads?
  • 0 Votes
    4 Posts
    17k Views
    A
    Good to know, and thanks for providing your solution!
  • Does Qt has api for audio and video capture for desktop application?

    3
    0 Votes
    3 Posts
    2k Views
    P
    [quote author="VanDerSam" date="1330770978"]See Qt documentation about QtMultimedia module and Phonon module.[/quote] but i did not find camera related api for desktop application. Is Qcamera will work only for mobile application or for desktop application?
  • UpdateGL() with QTimer not working

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Thread or process?

    15
    0 Votes
    15 Posts
    7k Views
    M
    The thread scheduling policies are OS specific. Today, most OSes automatically switch between threads. The answers in this thread are Linux-focused, where scheduler policies and thread priorities are available through system APIs (not Qt). On some setups, manipulating these requires security privileges (google for AEGIS, for example on the N9). There were OSes in the old days (that are sometimes still around, which is why I mention that) where threads needed to "yield" (cooperative multitasking). There are a few tools in Qt that can make your live a lot easier, like QThreadPool and QRunnable. Implementing your own thread class is rarely needed and rather old school.
  • Crash when running an XQuery via QtConcurrent::run

    3
    0 Votes
    3 Posts
    2k Views
    I
    Couldn't recreate this on Windows so perhaps it's Mac only. Will try and test it on a pre-Lion Mac to narrow it down further. (Sorry, I know I seem to be basically using this thread as a notepad now, but hopefully I'll be able to cobble together enough info for a bug report at least).
  • IP Address conversion from string to unsigned int

    7
    0 Votes
    7 Posts
    14k Views
    D
    You added that to the .PRO file and ran QMake afterwards? Anyways, as you say, case is closed.
  • [Mac Lion] QT Won't Compile

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Using Loader Objects to Access C++ Methods

    2
    0 Votes
    2 Posts
    1k Views
    sierdzioS
    Is it not working when you just run what you wrote here?
  • Defining structure types in a class

    3
    0 Votes
    3 Posts
    16k Views
    P
    Thanks. I thought it was a scope problem but my typo masked my test results. It's always the little things!
  • QScript privacy concerns

    2
    0 Votes
    2 Posts
    1k Views
    R
    You seem to be getting confused between the embedded QtScript which is a javascript interpreter embedded in your Qt application for writing extensions etc. and the javascript interpreter used in QtWebkit. Whilst these may be using the same underlying interpreter code, they are not the same thing. To do what you want, you need to integrate tightly with the javascript implementation being used by your web browser, which will basically mean working on the webkit code directly, not simply using the QWebView etc. APIs and the javascript bridge code.
  • 0 Votes
    10 Posts
    4k Views
    R
    It is certainly possible to get one X11 process to draw into a pixmap created by another by passing the Pixmap handle around, and I've written test code that does this. Unfortunately for video drivers etc. such as TV capture cards, I found that whilst the video4linux api specifies a Drawable which means that both a Window handle and a Pixmap handle should work, in many cases only a Window handle is actually supported by the drivers. Since sharing pixmaps between processes requires addition work anyway to ensure that you avoid race conditions, I doubt it is a good solution to your problem.
  • [QNetworkAccessManager + QNetworkCookieJar] Cookies are not saved

    2
    0 Votes
    2 Posts
    4k Views
    R
    QNetworkManager can perform several requests at the same time. You have done nothing to make sure that your two http requests are not performed in parallel. Rather than creating your two requests at the same time, make the second one be created when the first one has completed. At the moment, your code inherently contains a race condition which means the behaviour is likely to be unpredictable. I'm not saying this is definitely what's happening here, just that unless you address this it's not going to be possible to determine what the code should do.
  • QImage load JPEGs not working - Qt4.6.3, QtCreator2.0, Ubuntu 9.8

    17
    0 Votes
    17 Posts
    38k Views
    D
    Hi everyone! Maybe it would be useful. Problem may be in path to image. Just by adding ":" a got my image to display. E.g.: "images/pic.jpg" -> ":images/pic.jpg".
  • [SOLVED] Setting 8bit alpha channel/mask to QPixmap?

    2
    0 Votes
    2 Posts
    2k Views
    ?
    Figured out a fairly low level way to do it - if anyone should care to do the same - it is achievable by "injecting" alpha data into the appropriate locations of a QByteArray and using QPixmap::loadFromData to turn it back into a pixmap