Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • QRemoteObject Tcp examples

    1
    0 Votes
    1 Posts
    322 Views
    No one has replied
  • MarkdownDialectGitHub

    Solved
    3
    0 Votes
    3 Posts
    333 Views
    C
    @JonB That would explain why my underlined text is showing up as italic. Github dialect doesn't have 0x4000. But Qt 5 doesn't seem to have QTextMarkdownImporter. And weirdly: MarkdownDialectCommonMark = 0
  • 0 Votes
    3 Posts
    776 Views
    D
    @Jens-G As @JonB already said clazy complains about the temporary QList returned by .keys(). To prevent it you could either use QMapIterator or QMap::key_iterator to join your code. I made some quick and dirty "performance" measurements on my machine and STL-style key iterators seem to be consistently faster than the other methods: .join(): T1: "Bananas, Bread, Milk" Timing: 3900 nanoseconds. QMapIterator: T2: "Bananas, Bread, Milk" Timing: 4200 nanoseconds. STL-style: T3: "Bananas, Bread, Milk" Timing: 1500 nanoseconds. Done on Windows 11, Visual C++ 2022, Qt 6.5.0 Release mode with AVX2
  • QTextEdit Feature request

    Solved
    5
    0 Votes
    5 Posts
    318 Views
    JonBJ
    @clarify You go to https://bugreports.qt.io/, create your "Bug report" with the default Issue Type of Suggestion, and see what happens to it :)
  • QTextEdit remove list

    Solved
    6
    0 Votes
    6 Posts
    417 Views
    C
    @JonB I can confirm that the approach used on S.O. works. Thanks for that.
  • Question on using QRegularExpression

    Solved
    8
    0 Votes
    8 Posts
    802 Views
    L
    @JonB Right, that makes sense. I think what I have is the same I just decided to add a boolean for simplicity :)
  • Small gap in Qt documentation

    Solved
    5
    1 Votes
    5 Posts
    360 Views
    Z
    @kkoehne Yes, in QT 6.5 doc it is fixed. Thank you
  • Unable to save to remote location

    Unsolved
    6
    0 Votes
    6 Posts
    353 Views
    JonBJ
    @mahmoodn So however it does it (from Nautilus?) it maybe is different from however it does "opened a file from a remote location" in Creator? I don't know how you do that from Creator vs Nautilus/gedit, if Creator accepts drag&drop maybe you can try that from Nautilus instead of "open remote"?
  • Extended description of Qt Opc UA

    Unsolved
    1
    0 Votes
    1 Posts
    110 Views
    No one has replied
  • QTableView Right Mouse Button selects

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    C
    @JonB Thank you! That is a serious problem which I had not noticed. and I made a quick fix , here it is: bool eventFilter(QObject * obj, QEvent * event) override { qDebug()<<obj<<event->type(); if(event->type() == QEvent::ContextMenu) { QTableWidget *tableWidget = static_cast<QTableWidget*>(obj->parent()); //restore selection when contextMenu is called tableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); } if(event->type() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event); //eventFilter is installed on table viewport, because mousePressEvents are not captured... //...if the eventFilter is installed on the table directly //The table could be accessed using viewport->parent() QTableWidget *tableWidget = static_cast<QTableWidget*>(obj->parent()); //if it's an RMB event, disable selection if(mouseEvent->button() == Qt::RightButton) { tableWidget->setSelectionMode(QAbstractItemView::NoSelection); } } return QObject::eventFilter(obj, event); } Thank you for you feedback! any further feedback is appreciated!
  • How to manage choice item property my plugin in Qt 6.5

    Unsolved
    4
    0 Votes
    4 Posts
    773 Views
    giorgik63G
    Hello Pl45m4, thank you for the time you gave me. I also found version 0.6.2, but it doesn't change much from the code I used. The problem apparently doesn't seem to be the code but the development environment I use: 6.5.0_msvc2019_64, Qt Creator based on Visual Studio C++ 2019 (the version I have of Visual Studio C++ is the 2022 Community) with Extensions | Qt VS Tools. This was an old Qt issue already dating back to 4.7.x with the same plugin I presented in the post. I was able to get it to work properly in Qt Designer based on MinGW 4.8. Others had tried to use it in Visual Studio C++ but they couldn't set the led shape from the Qt Designer properties, just like it happens to me. By chance, were you able to make it work in Qt Designer (the change of the form corresponds to a different display of the LED on the form you are drawing in Qt Designer)? If yes, can you tell me which version of Qt Creator, Qt Designer you use and with which compiler-environment (MinGw which version, Visual Studio C++ which version) ?
  • How "hide" some files in creator tree?

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    A
    Totally agree - they should add new option, something like "Hide linked headers", same as Borland/Embarcadero do it for many years in C++ Builder. Because Borland form unit consists of 3 files: cpp file, hpp file, frm (form) file. It is not necessary to display these 3 files separately. Same in Qt - I want to see units: cpp+h and switch between them when working with this unit.
  • How to mark text as a header in QTextEdit

    Unsolved
    8
    0 Votes
    8 Posts
    650 Views
    JonBJ
    @clarify Glancing at sources I can only say/see that QTextEdit sets indent in QTextEditPrivate::createAutoBulletList(). For the rest there is a QTextHtmlImporter::import(). For yours maybe you'd have more luck with <ul>, I don't know. By the way, just a feature request: It'd be nice if QTextEdit could generate simple HTML, with no CSS at all, like the more rudimentary browsers can understand e.g. Lynx, Links. By now you should know this a user forum, and I am a user just like you, no point requesting features here!
  • QLineEdit not clear when I selected an item after get focus in second time

    Unsolved
    4
    0 Votes
    4 Posts
    777 Views
    Axel SpoerlA
    @Kaguro It's a bit hard to tell, what the a QCompleterand a corresponding QLineEditdo, if their connection is intercepted. There is a bug which we currently work on, which has to do with focus setting on a completer. Maybe it's related. You could follow it up, it's gonna be merged soon.
  • QTextEdit markdown parser issue

    Unsolved
    2
    0 Votes
    2 Posts
    273 Views
    C
    @clarify This does not work: underline i.e. the _ character causes italic not underline.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • QImage+QPainter+QPdfWriter + newPage() = working code

    Unsolved
    20
    0 Votes
    20 Posts
    4k Views
    Pl45m4P
    @RazerMind Have a look at LibHaru, esp. the Graphics part https://github.com/libharu/libharu/wiki/Graphics
  • Stylesheet inheritance with pseudo-states

    Unsolved
    2
    0 Votes
    2 Posts
    200 Views
    MegamouseM
    It turns out the solution is to use the existing QProperty declarations in the QWidget header: #my_widget #my_label { color: black; } // This does not work // #my_widget:focus #my_label { // color: white; // } // This works #my_widget[focus="true"] #my_label { color: white; } Sadly, to make this work, you still need to check the focus events of your parent widget and do: my_label->style()->unpolish(my_label); my_label->style()->polish(my_label); Also, the hover state doesn't seem to be represented as QProperty, so I'll have to add that property manually and query the QHoverEvents
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • qmake exited with code 3

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    SGaistS
    Hi, Did you also install the ˋ-dev` variant of that package ?