Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Font size in QPrinter

    Unsolved
    2
    0 Votes
    2 Posts
    478 Views
    K
    @HoMa This might depend on your OS. From QPrinter documentation: When printing directly to a printer on Windows or macOS, QPrinter uses the built-in printer drivers. On X11, QPrinter uses the Common Unix Printing System (CUPS) to send PDF output to the printer. As an alternative, the printProgram() function can be used to specify the command or utility to use instead of the system default. Therefore you need to check with other tools if you see the same effect. Probably you will.
  • License check failed! Giving up...

    Unsolved
    4
    0 Votes
    4 Posts
    635 Views
    SGaistS
    Hi, Maybe a silly question but did you also remove (or move somewhere else) the old licence file ?
  • 0 Votes
    2 Posts
    4k Views
    SGaistS
    Hi and welcome to devnet, That's because you try to access a standard member variable from a static function. Take a look at the ir_receiver example of the pigpio project. It shows how to use a class with the callback with gpioSetAlertFuncEx.
  • A new dialog?

    Solved
    2
    0 Votes
    2 Posts
    132 Views
    SGaistS
    Hi, It's something you have to do yourself. There's no ready-made "ShowSomethingFromAModelDialog".
  • How to remove (bulleted) lists from QClipboard mime data

    Unsolved
    2
    0 Votes
    2 Posts
    146 Views
    raven-worxR
    @anphetamina only by removing rich text completely. To do so subclass QTextEdit and reimplement createMimeDataFromSelection() virtual method , call the base class implementation and remove (or even manipulate) the rich text mimedata type.
  • Module machine type 'x64' conflicts with target machine type 'X86'

    7
    0 Votes
    7 Posts
    19k Views
    A
    @love8879201 Thank you! That worked like a charm!
  • Specifying C++17 stops C++14 features

    Solved
    7
    0 Votes
    7 Posts
    3k Views
    M
    Finally, I used C++14 on QMake project file: CONFIG += c++14 QMAKE_CXXFLAGS += -std=c++14 Then this error is received: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'? I bypass the error by this: #ifdef __APPLE__ // On our current macOS build environment: // Qt 5.11.3 // macOS 10.13.6 High Sierra // Xcode version 9.4.1 // // C++14 works for 'std::enable_if_t' but not `std::is_same_v` // C++17 works for none of them! // // A workarond is to self-define `is_same_v` according to this: // https://en.cppreference.com/w/cpp/types/is_same template< class T, class U > inline constexpr bool is_same_v = std::is_same<T, U>::value; template<class T, class O = T> using IteratorOnly = std::enable_if_t< !is_same_v<typename std::iterator_traits<T>::value_type, void>, O >; #else // __APPLE__ template<class T, class O = T> using IteratorOnly = std::enable_if_t< !std::is_same_v<typename std::iterator_traits<T>::value_type, void>, O >; #endif // __APPLE__
  • Python and C++

    Unsolved
    2
    0 Votes
    2 Posts
    181 Views
    JonBJ
    @Alfie-Anil Yes, if you wish, you can have either way (C++ calling Python or Python calling C++). IIRC, it's probably easier to have the main program written in C++ which embeds Python than the other way round. Python-level reading material: https://docs.python.org/3/extending/windows.html https://docs.python.org/3/extending/embedding.html If plain non-Qt Python is not a good fit, you may want a Qt-aware Python library like PyQt5. I'm not sure, but there may be specific references for that under PyQt5 (or even PySide2; don't forget that choosing PyQt5 changes your licensing requirements).
  • Presenting horizontally scrollable text with label

    Unsolved
    2
    0 Votes
    2 Posts
    490 Views
    JonBJ
    @MS_GX I don't know whether you have a good reason for doing this via "two QGraphicsScene widgets"; you may have, perhaps for the zooming, perhaps for the column headers. I don't know about gfx scene widgets. But I will say the following, as possible food for thought. This looks like just a plain QTableView/QTableWidget. That has "horizontal headers", which is what your label column is. You can have the non-header area horizontally scrollable, for the sequences. (You can also reduce the gap between label & data.) You can also vertically scroll that. The advantage is that you don't have to worry about "syncing" the vertical scroll between two separate vertical widgets, it will scroll both. You also get the "keep vertical column headers in place" when scrolling vertically. Or, there is the Frozen Column Example to do the label column as "frozen" in place in a different way, still in a QTableView. As I say, you'll have to investigate whether this would allow the operations you want on items.
  • QScrollBar doesn't emit 'sliderMove(int)' signal when scrolling with mouse-wheel

    Solved
    6
    0 Votes
    6 Posts
    2k Views
    A
    @Christian-Ehrlicher , no need for condescending attitude. I do read the documentation before making assumptions but I must have missed this one.
  • Auto Update Model in QWidgetMapper

    Unsolved
    3
    0 Votes
    3 Posts
    611 Views
    JonBJ
    @hadi_m I do this on a widget mapper for a whole bunch of QSpinBoxes. I connect to QSpinBox::valueChanged and the slot calls QDataWidgetMapper::submit() to update the model immediately. It works a treat :) Presumably you can do the same against QLineEdit::textEdited. Note that there is a potential little wriggle. If you're not careful, you change the model, it then changes the widget, and then that re-raises the "changed" signal and you get stuck forever. My slot reads the current value from the model and exits if the value passed to the slot is the same as that retrieved from the model. I also use Qt::QueuedConnection to prevent the slot causing changes while still within the original signal call, which was a problem. These may be because I am using QSpinBoxes, may not apply when using QLineEdit::textEdited (which is a different signal from QLineEdit::textChanged which will be emitted when you change the value in the model programmatically and it reflects back to the widget).
  • This topic is deleted!

    Unsolved
    2
    -2 Votes
    2 Posts
    40 Views
  • Qt Plugin: Fixing C++ ABI Problems with "external C"

    Solved
    6
    0 Votes
    6 Posts
    982 Views
    Christian EhrlicherC
    @fem_dev said in Qt Plugin: Fixing C++ ABI Problems with "external C": to the interface functions and still uses Qt C++ signals and slots to transfer data between the plugin and the main app? Since this is c++ - no.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    31 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    5
    0 Votes
    5 Posts
    44 Views
  • Qt4 to qt5

    Unsolved
    6
    0 Votes
    6 Posts
    597 Views
    SGaistS
    Hi, Can you show the implementation of your DrawWidget class ?
  • QMutex error : destroying locked mutex

    Moved Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    kshegunovK
    Run with QT_FATAL_WARNINGS environment variable set and extract a stack trace. Paste it here.
  • Qprocess don't work, when I use FFmpeg commands.

    Unsolved
    7
    0 Votes
    7 Posts
    704 Views
    N
    Ok, my bad, I give arguments without spaces and with path this will be working :) ( ThX m8 )
  • Pressing the "Enter" key triggers unwanted response from a Button

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    artwawA
    Hi, <enter> key will always trigger default button as this is default shortcut key. Default button is usually with bold shadow on Windows - the focus is marked differently. Please check autodefault properties of the buttons - if the buttons are in the button group, check also settings there.
  • Latin char in QListWidget

    Solved
    6
    0 Votes
    6 Posts
    496 Views
    naaxN
    @Christian-Ehrlicher Ok, ill try to change "out" into QString. QTranslator I have already but I'm not sure that works well. int main(int argc, char *argv[]) { QApplication a(argc, argv); QApplication app(argc, argv); QTranslator myappTranslator; myappTranslator.load(QLocale(), QLatin1String("myapp"), QLatin1String("_"), QLatin1String(":/i18n")); app.installTranslator(&myappTranslator); MainWindow w; w.show(); return a.exec(); }