Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • [OS X] Cmd+R shortcut not working

    Unsolved
    2
    0 Votes
    2 Posts
    452 Views
    A
    @Kernelcoffee It's not reserved on OSX. It is possible you have it set as a global hotkey for some other app though that could intercept it before it got to your application.
  • This topic is deleted!

    Locked Unsolved
    2
    0 Votes
    2 Posts
    22 Views
  • Program crashes when i setCentral Widget

    Solved
    3
    0 Votes
    3 Posts
    715 Views
    S
    Ok makes a lot of sense, thanks!
  • The program has unexpectedly finished.

    Solved
    13
    0 Votes
    13 Posts
    4k Views
    O
    @VRonin ipmlementation is based on Graphics Gems III's "Faster Line Segment Intersection" I find it interesting that this comes from the same set of books I used extensively in the early 1990 and probably used this routine. (I was developing an object oriented GIS-Facilities Manage System for utilities using Smalltalk that was base on interactive graphics, when most graphics systems were batch. In did interactively what others did with a clean and build. I worked extremely well on a 386 machine running OS/2.) Are all the Qt classes on that web site? It does as I thought that it would by assigning the value. Again, my mistake was an errant qDebug using the dangling pointer. I need to go back to the C++ literature to look at assignment. Is it a replacement of pointers or is it copying the variables of the new point replacing the existing ones--which would be a problem if the pointer was not initialized.
  • QVariant and COM (ADODB) types conversion

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    T
    @mrjj said in QVariant and COM (ADODB) types conversion: You are using "raw" calls via ole? (via the dumpcpp tool) Yes, exactly. There is a possibility to omit dumpcpp wrapper classes and to work with COM in "Win-32" style, but i do not feel like delving into that at the moment :) @mrjj said in QVariant and COM (ADODB) types conversion: I wonder if you could modify the dumpcpp output to work but not not really sure where the convert really fails. I tried looking into \Src\qtactiveqt\src\activeqt\shared\qaxtypes.cpp but there are obviously no functions which cover ADO internal types, only QVariant VARIANTToQVariant(). May be it is inside adodb.cpp generated by dumpcpp, but i am not familiar enough with moc internals.
  • why to use QStringLiteral instead of QString

    Unsolved
    6
    0 Votes
    6 Posts
    22k Views
    VRoninV
    The only downside I found is that, being a macro, it breaks inline static code analysis in Visual Studio. Definitely a minor thing that should not stop you using it. The only case where it'd avoid it is if there is an explicit overload for const char* or QLatin1String. for example: QString base("base"); base.prepend("prepended"); //better base.prepend(QStringLiteral("prepended")); //worse
  • how to disable ESC key "close" the QProgressDialog ?

    Solved
    11
    0 Votes
    11 Posts
    11k Views
    T
    for me only overriding event(QEvent*) worked good: protected: bool event(QEvent* event) { QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); if(keyEvent && keyEvent->key() == Qt::Key_Escape) { keyEvent->accept(); return true; } return QProgressDialog::event(event); }
  • How to add watermark of one QImage with Qt ?

    Solved qpainter qimage watermark
    8
    0 Votes
    8 Posts
    5k Views
    M
    @joeQ As per your suggesttion i'll make changes in the code on my own.Once again thanks for your help.
  • MinGW32-make and Q_INIT_RESOURCE

    Solved
    8
    0 Votes
    8 Posts
    3k Views
    SGaistS
    Answer E It shows you are trying to load a file from a relative path on the hard drive.
  • How to get all namespaces in QDomDocument?

    Solved
    3
    0 Votes
    3 Posts
    737 Views
    K
    @mrjj thanks, I think I have missunderstand Xml Namespace Scoping, before I thought I need to iter all the element first.
  • QCircularBuffer

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    T
    It's now marked as internal. Which means it's not intended for public usage anymore. To use it you need to add into your .pro QT += 3dcore-private and include: #include <Qt3DCore/private/qcircularbuffer_p.h> and that's it: Qt3DCore::QCircularBuffer<int> b {1,2,3,4}; qDebug() << b.last();
  • How to start other .exe and return value ?

    Unsolved
    9
    0 Votes
    9 Posts
    3k Views
    VRoninV
    I think the main question here is: how does your external application returns the data? does it exit with a different code for each possible result (it would be unsual but I'm not ruling it out)? does it print to standard output (the console) the answer? if so in what format? does it communicate in any other way (shared memory,DBus,TCP,Local Socket, HTTP, FTP, etc)?
  • This topic is deleted!

    Unsolved
    11
    0 Votes
    11 Posts
    46 Views
  • Which Container is best suited for holding 10 millions of records (String, String) ?

    Unsolved
    21
    0 Votes
    21 Posts
    7k Views
    VRoninV
    @joeQ You need to have spent quite a bit of money on RAM for your PC for that to be an option
  • Trouble implementing back end functionality to UI

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    jsulmJ
    @bdandans said in Trouble implementing back end functionality to UI: Doesn't that set it to whatever's in the box at the time, which is nothing initially? Yes, what else should it set? Just do it when it is needed (for example when the user clicks Next button). How do I make that assignment once the user has finished filling the form? Connect a slot to the Next button and do it there. From your first post: QObject::connect(nextButton, SIGNAL(clicked(bool)), nameInput, SLOT(nameInput = nameLineEdit)); QObject::connect(nextButton, SIGNAL(clicked(bool)), heightInput, SLOT(heightInput = heightBox)); QObject::connect(nextButton, SIGNAL(clicked(bool)), widthInput, SLOT(widthInput = widthBox)); this is invalid code. Please read http://doc.qt.io/qt-5.9/signalsandslots.html It should look like this: QObject::connect(nextButton, SIGNAL(clicked(bool)), this, SLOT(nextClicked())); void MainWindow::nextClicked() { // Read here the values }
  • Showing the contents of the d pointers during debugging

    Unsolved gdb debugger
    2
    0 Votes
    2 Posts
    2k Views
    M
    Any ideas? The same question had been brought up at the Qt mailing list years ago: http://lists.qt-project.org/pipermail/interest/2015-September/018826.html But the things suggested there did not helped me. Adding an expression for the d pointers did not help either.
  • Dynamic allocation of array as the user types the string.

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    S
    your issue is the char is only 1 and your gonna keep relocating 1 char each time. me personally i would use a for loop for(char *username = 0; username < 15; username ++) // if size is less than 3 return else if size greater than 15 return // getche and calloc and length realloc it..
  • QTreeWidget Signal itemDoubleClicked Returns QModelIndex?

    Solved
    2
    0 Votes
    2 Posts
    745 Views
    F
    Yes, but you can access the Data by using the method data() from the QModelIndex
  • QSettings and xml

    Unsolved
    14
    0 Votes
    14 Posts
    6k Views
    Z
    @Taz742 yes, thank you
  • Using search paths with Qt Designer

    Solved
    5
    0 Votes
    5 Posts
    3k Views
    A
    Hi, it finally clicked, this will work perfectly, thank you!