Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • 0 Votes
    6 Posts
    3k Views
    M
    Is there any way to get a Pointer to the QWidget subclassed centralWidget "Paint" and its members and member functions? For example via QMainWindow QWidget * centralWidget() const ?
  • Qpixmap scale to preserve the color mapping

    11
    0 Votes
    11 Posts
    2k Views
    H
    [quote author="raven-worx" date="1421844500"]well such an approach is very error prone .. .as you see :) Why not checking programmatically? For example if you depend on analyzing the image data you can translate points (e.g. from mouse events) from your graphics item to the point in the image via the calculated scale factor. So that your logic still operates on the original sized image.[/quote] Its more complicated than that. First, the items must be created before the mouse is clicked. Then they are connected with the game logic, they are connected with the graph logic too. The items are set before user knows it. It would be simple just to click and create item, but the code is already rolled that way and I dont have time to complete reverse engeneering it. So SVG scale? Any hints? I`d be grateful if you hint me abotu QSvgRenderer.
  • [SOLVED] Qt TreeView does not show Tree

    3
    0 Votes
    3 Posts
    1k Views
    H
    Thx it was the column count!
  • How to filter QListView that contains with QSortFilterProxyModel?

    10
    0 Votes
    10 Posts
    8k Views
    A
    I had already told you that in one of your other topics, by the way. Please stop opening topics on the same problem over and over again.
  • Qt Widgets vs Qt Quick for desktop and mobile application

    5
    0 Votes
    5 Posts
    2k Views
    Y
    Yes. Feature set will be less compared to desktop and a light weight app on mobile. Thank you
  • 0 Votes
    1 Posts
    448 Views
    No one has replied
  • Setting different sizes to tabified QDockWidget?

    5
    0 Votes
    5 Posts
    3k Views
    N
    Maybe you are right. For now, I leave minimum size set to 1. Maybe I will think about solve this problem later.
  • Modal dialog blocks event loop on Mac OS

    4
    0 Votes
    4 Posts
    2k Views
    S
    To get the feedback from the dialog connect to its signals and "continue execution" there. You can connect a c++ closure if you want to stay in the same method. This is how it works.
  • [SOLVED]Pointer to the first character of a QString?

    4
    0 Votes
    4 Posts
    2k Views
    ealioneE
    Quick question: I also noticed below that, the function QString::​constData(), but I couldn't find any examples so I am not sure I understood how can I iterate a QString using it. EDIT: I also understood how to use constData. After a few tests I think I am ok now. Thanks for the link.
  • Window attached to a system tray icon

    3
    0 Votes
    3 Posts
    1k Views
    raven-worxR
    [quote author="Cesius" date="1421794006"] Is there any class to create a window attached to a system tray icon in a similar way as Dropbox does it?[/quote] Not directly offered via the Qt API. But you can try this: Use QSystemTrayIcon::setContextMenu() to set a custom QMenu. This QMenu instance actually doesn't need to have a ordinary menu item but a QWidgetAction. @ QWidgetAction* widgetAction = new QWidgetAction; widgetAction->setDefaultWidget( widget ); QMenu* widgetMenu = new QMenu( sysTray ); widgetMenu->addAction( widgetAction ); sysTray->setMenu( widgetMenu ); @ Haven't tested this code though, but worth a try.
  • Iteration of contents model from treeView type...

    1
    0 Votes
    1 Posts
    362 Views
    No one has replied
  • [SOLVED] DLL injection works, except when I compile it with Qt Creator

    4
    0 Votes
    4 Posts
    2k Views
    hskoglundH
    Could be the culprit is the pLibRemote pointer you get from the VirtualAllocEx call, in the 64-bit injector program that pointer is 64-bit, and I think it confuses WriteProcessMemory, i.e. writing into a 32-bit code segment using a 64-bit pointer = no happiness.
  • Debug assertion in stl algorithms when using vertical stlyesheets

    4
    0 Votes
    4 Posts
    1k Views
    Q
    I have the same problem (Qt 5.2.1 and VS 2008). I get an “Expression: sequence not ordered” assertion in “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\algorithm” line 2262 when add the following style to QCheckBox @QCheckBox::indicator:unchecked { image: url(:/images/checkbox_unchecked.png); }@ P.S. @QCheckBox::indicator:checked { image: url(:/images/checkbox_unchecked.png); }@ works good
  • 0 Votes
    8 Posts
    5k Views
    A
    Is this the most significant part of it? &“warning: ASSERT: \“debugger->state() QV4::Debugging::Debugger::Paused" in file debugger\qv4debugservice.cpp, line 1001\n" ASSERT: "debugger->state() QV4::Debugging::Debugger::Paused” in file debugger\qv4debugservice.cpp, line 1001 &”\n” &“warning: Invalid parameter passed to C runtime function.\n” Invalid parameter passed to C runtime function. &”\n” &“warning: Invalid parameter passed to C runtime function.\n” Invalid parameter passed to C runtime function. &”\n”
  • 0 Votes
    7 Posts
    2k Views
    A
    I am going to close topic since it is seems is not related to QMdiArea but more to subwindow widget attributes.
  • 0 Votes
    11 Posts
    13k Views
    JKSHJ
    [quote author="drewpotter" date="1421794364"]Wow. I just found a posting about this: Qt WebEngine is not available for the MinGW build because Chromium does not support building with MinGW.[/quote]Yes, that is a limitation from the Chromium Project itself. Note that you need MSVC 2013; older versions of MSVC are not supported: http://www.chromium.org/developers/how-tos/build-instructions-windows
  • How can I verify an SSL Certificate given a local path in a GUI app

    5
    0 Votes
    5 Posts
    3k Views
    Q
    Maybe you do not understand my Question: so just to Clarify, I know how to verify the Certificate for the Server / Client Connection, and as you have pointed out, it could use QSslCertificate, in which case it would have to use a Constructor of some sort, not sure why you mentioned that like it was an Example, because like I said, I already have the code examples I need to figure out that much, my question is can I read a Certificate from disk and stored its Credentials in a File, so that I can verify the Certificate off line, without having SSL or Webserver installed, my guess is that OpenSSL is going to have to be required, not sure, because I can not figure out how to do that with QSslCertificate, nor do I know if its even possible at this point, but I do know how to program, been doing it since 1979, so I think I could use a little help figuring out how to do a task that seems simple, but the way to do it eludes me, I have been researching all the classes, what is confusing me is that I am not using this information to setup an SSL Connection, I only want to verify that the Certificate on Disk, is the same as the one I have on file, I am not connecting to it or using it as an SSL connection, I simple want to open the file, and get some value from it that is secure to use as an Encryption key to decrypt data stored in an XML file, I hope I am clear about the question, I have a hard time explaining things at times. One of my thoughts is to use one of the Subject fields, then try to decrypt a known value using that key, if it passes I know the Certificate at least has the correct Subject, so I got to thinking maybe there is a field that you can only access if you have a key, but I can not find any feature like that, but it would be nice, so it seems it must exist, but for now I think this level of security might be good enough, because I am sure the certificates must match when I create the connection, which gives me access to an online website. It seems this form of security is about the equivalent to writing the password in an unprotected file, but lets face it, if you have the file, you have the key anyway, so if its on a flash stick, this security might be as good as it gets, I could have the program require online authentication once before it can use the offline mode, then save that verification along with the public access IP address, then only require online validation if the address changes outside a normal Dynamic IP range. Thanks for the Help.
  • Can't receive UDP on linux system

    6
    0 Votes
    6 Posts
    2k Views
    I
    Hi guys:      I found where the problem is, because the linux connect to internet by wireless, and the windows have two interface, one by wireless and the other one by ethernet. If i remove the ethernet from windows, the linux system can receive the UDP from the windows through wireless. Can QUdpSocket have function that could ask which interface to broadcast??
  • Vertical Header ResizeToContent(Qt 5.3)

    2
    0 Votes
    2 Posts
    588 Views
    SGaistS
    Hi, You should check the "bug report system":http://bugreports.qt.io to see if it's something known, if not please consider opening a new report providing a minimal compilable example.
  • [SOLVED] QWebView - play/pause video programmatically?

    2
    0 Votes
    2 Posts
    1k Views
    M
    Solved! Youtube page doesn't use jquery ;) @//----------------------------------------------------------------- void WebBrowser::playVideo() { qDebug() << "WebBrowser::playVideo()"; QString jsValue = "document.getElementById('movie_player').playVideo();"; ui->webView->page()->mainFrame()->evaluateJavaScript(jsValue); } @