Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Trying to set the colour for hyperlinks in QTextBrowser

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    Gojir4G
    @Perdrix Sorry to come later on this. But there is an interesting note about this in documentation of QPalette: Note that we do not use the Link and LinkVisited roles when rendering rich text in Qt, and that we recommend that you use CSS and the QTextDocument::setDefaultStyleSheet() function to alter the appearance of links. For example: QTextBrowser browser; QColor linkColor(Qt::red); QString sheet = QString::fromLatin1("a { text-decoration: underline; color: %1 }").arg(linkColor.name()); browser.document()->setDefaultStyleSheet(sheet);
  • Qt and coroutines

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    F
    Thank you for all your support guys! Everything is much more clear now!
  • QListWidget, new selections, last selections

    Solved
    3
    0 Votes
    3 Posts
    197 Views
    SPlattenS
    @jsulm , thank you, thats what I'm looking at implementing now.
  • QTextStream question

    Solved
    16
    0 Votes
    16 Posts
    2k Views
    Q
    @JoeCFD said in QTextStream question: std::cout << qPrintable( QString( "%1." ).arg( a, 2, 10, QChar( '0' ) ) ) << qPrintable( QString( "%1" ).arg( b, 2, 10, QChar( '0' ) ) ) << std::endl; Compare your statement with mine if I define a simple macro: #define co(width, what) qSetPadChar('0') << qSetFieldWidth(width) << what << qSetFieldWidth(0) Then: "01.02" output is much simpler: cout << co(2,a) << co(0,'.') <<co(2, b) << Qt::endl;
  • windeployqt: Unable to locate ICU library icudt72.dll

    Unsolved
    1
    0 Votes
    1 Posts
    350 Views
    No one has replied
  • How to quit Application immedialy after QMessageBox?

    Unsolved
    5
    0 Votes
    5 Posts
    334 Views
    K
    @Chris-Kawa Nice tipps, thx, I just began this way, forgot to put QApplication to first line
  • 0 Votes
    3 Posts
    208 Views
    D
    @mpergand I will try this, thank you. Update: Works fine, I was unware of sender() of QObject. Thanks!
  • debug.log file created when removing files from qtwebengine_locales

    Unsolved
    1
    0 Votes
    1 Posts
    196 Views
    No one has replied
  • Will Qt support Apple Vision Pro / visionOS?

    Unsolved
    6
    0 Votes
    6 Posts
    874 Views
    SGaistS
    @Felix-van-de-Donk the thread is here.
  • QTreeView memory consumption increasing

    Unsolved
    16
    0 Votes
    16 Posts
    1k Views
    JoeCFDJ
    @jinming if loading blocks UI, send loading to a thread.
  • QLabel with <img>

    Solved
    3
    0 Votes
    3 Posts
    210 Views
    PerdrixP
    @Pl45m4 It appeared to have a transparent background but actually had a checker-board background, so it looked right, but wasn't. Editing file and making the background truly transparent solved the problem. D.
  • 0 Votes
    23 Posts
    2k Views
    C
    The problem was a missing reference on the container. It should have been QList<Bookmark>&, thus it didnt update the container when I add a book.
  • This topic is deleted!

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

    Solved
    7
    0 Votes
    7 Posts
    48 Views
  • QByteArray saves wrong size with UTF8

    Solved
    6
    0 Votes
    6 Posts
    471 Views
    C
    @JAVH The longblob column should have the pseudo-character set "binary" (see, e.g., the second paragraph here) The blob is not a string with UTF-8 or any other encoding.
  • Tooltip for each Qplieslice in a QPieSeries

    Unsolved
    2
    0 Votes
    2 Posts
    357 Views
    M
    In terms of when to hide, Qt 6.6 has a different hovered() signature which includes a bool, which is set to true on mouse over and false on mouse exit. so: void xyzObject::slotSliceHover(bool hovered){ QPieSlice* hoverSlice = qobject_cast<QPieSlice*>(QObject::sender()); if (hoverSlice != nullptr){ if (hovered) hoverSlice->setExploded(true); else hoverSlice->setExploded(false); } }
  • Build errors in qjsnumbercoercion.h under Qt 6.6.0 on Windows 11

    Solved
    3
    0 Votes
    3 Posts
    514 Views
    E
    Adding the #define NOMINMAX in the source file that loads a lot of header files did the trick. I'll have to track down the specific header that's causing this. You put me on the right track. Thank you.
  • QStyledItemDelegate how to force close the editor?

    Unsolved
    4
    0 Votes
    4 Posts
    410 Views
    Christian EhrlicherC
    @StudentScripter said in QStyledItemDelegate how to force close the editor?: but sadly this way my delegates editevent logic isnt working anymore when clicking on this area. What does this mean? clickPosition is relative to the view, not relative to the current cell (how should it be?).
  • on screen logging

    Solved
    14
    0 Votes
    14 Posts
    2k Views
    W
    @SimonSchroeder thank you very much for your help. It is more clear now to me the use of static keyword in global variables which I did not understand. I have moved the static call to myMessageHandler, also checked if file is already open. So everything is safer and more meaningful now. thanks again for your help!
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied