Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Open source and they obligations for personal use.

    Unsolved
    2
    0 Votes
    2 Posts
    265 Views
    Pl45m4P
    @mackowy said in Open source and they obligations for personal use.: If I want to use it for my own personal, non-commercial use, without publishing anything, can i simply ignore staff like this and enjoy for free? As long as you dont violate (L)GPLv3, yes... does it force me to publish? No, feel free to contribute or just enjoy using Qt. It's about the whole open source community not about every single individual :) Btw through posting this here you are already contributing in some way...
  • 0 Votes
    3 Posts
    367 Views
    G
    @Christian-Ehrlicher Yes, it is window style show, when linux the arrow is in Header Text right, how to set to arrow to right under window system? Thanks.
  • How to add a 3rd party C++ library to a Qt project?

    Unsolved c++ qt creator
    13
    0 Votes
    13 Posts
    3k Views
    Pl45m4P
    @mpnix said in How to add a 3rd party C++ library to a Qt project?: So, what does "do it properly" mean in reality? Sticking with CMake seems a first wise step (I only looked at the "Make" stuff to see if it gave me any different outcome - it didn't). After taking a closer look, it seem to require a Cygwin environment under Windows, which is also stated here: @Pl45m4 said in How to add a 3rd party C++ library to a Qt project?: Requirements The exiftool application must exist on the system. This interface should be platform independent, and has been tested on Mac OS X, Linux, and Windows (Cygwin). So it's only "pseudo" platform-indepentent. Can't tell you much about Cygwin... for Unix/Linux optimized stuff I use Linux directly and not Windows. You could try another, more Windows friendly, Exif library. For example this one: https://github.com/exiv2/exiv2 As far as I can see, it also supports CMake builds "out-of-the-box"... so no MakeFile converting etc. etc.
  • 0 Votes
    2 Posts
    213 Views
    Pl45m4P
    @Mizmas AFAIK no, because objects are always in their parent's coordinate system.
  • Sniffing with pcap in a GUI application

    Unsolved
    3
    0 Votes
    3 Posts
    227 Views
    JonBJ
    If pcap calls block/are synchronous then it would presumably have to go into its own thread. If calls are non-blocking/asynchronous then you can use those from main thread. If it's suitable maybe you can make calls on a timer. E.g. call your code intermittently rather than in a blocking loop.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    18 Views
    No one has replied
  • QToolTip and QLineEdit

    Solved
    4
    0 Votes
    4 Posts
    446 Views
    JonBJ
    @gabello306 Don't forget you should polish the style after this dynamic setProperty() change. QStyle::unpolish()/polish(), QWidget::ensurePolished(). Else it may not update immediately.
  • How to create QListWidgetItem with aligned left and right text in Qt?

    Solved
    7
    0 Votes
    7 Posts
    467 Views
    InTheBeningingI
    Using a custom QStyledItemDelegate like this class CustomListWidgetItemDelegate : public QStyledItemDelegate { public: void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override { painter->save(); if (option.state & QStyle::State_Selected) painter->fillRect(option.rect, option.palette.highlight()); else if (option.state & QStyle::State_MouseOver) painter->fillRect(option.rect, option.palette.highlight()); //left aligned if(index.data(Qt::DisplayRole).isValid()) { QString text = index.data(Qt::DisplayRole).toString(); painter->drawText(QPoint(option.rect.left() + 5, option.rect.bottom()-5), text); } //right aligned if(index.data(Qt::UserRole).isValid()) { QString text = index.data(Qt::UserRole).toString(); int textwidth = painter->fontMetrics().boundingRect(text).width(); painter->drawText(QPoint(option.rect.right() - textwidth - 5, option.rect.bottom()-5), text);; } //fixed if(index.data(Qt::UserRole + 1).isValid()) { QString text = index.data(Qt::UserRole + 1).toString(); painter->drawText(QPoint(200, option.rect.bottom()-5), text);; } painter->restore(); } }; Now that theres more than one text, the other texts are stored in UserRoles //install delegate on the ListWidget ui->listWidget->setItemDelegate(new CustomListWidgetItemDelegate); QListWidgetItem * item = nullptr; for(int i = 0; i < 5; i++) { item = new QListWidgetItem("ListItem"); item->setData(Qt::UserRole, "Yep"); item->setData(Qt::UserRole + 1, "Maybe"); ui->listWidget->addItem(item); }
  • How to set the text wrapped in the tablewidgetitem?

    Unsolved
    2
    0 Votes
    2 Posts
    153 Views
    SGaistS
    Hi, It's on the view. Check setWordWrap.
  • How to catch Ctrl+C on a widget?

    12
    0 Votes
    12 Posts
    23k Views
    I
    Maybe it's because the toolbar of the software has shortcuts like ‘ctrl+c,ctrl+e’ or something like that, where you need to press ctrl+c first and then press other keys to make it work.
  • hints in .ui files?

    Unsolved
    6
    0 Votes
    6 Posts
    399 Views
    T
    Ah, thanks @Bonnie! That tool I didn't know yet. Thanks to @JonB too!
  • How to Customize QMdiSubWindow Title Bar Style in Fusion Theme?

    Unsolved
    1
    0 Votes
    1 Posts
    188 Views
    No one has replied
  • 0 Votes
    5 Posts
    525 Views
    JoeCFDJ
    @haowong What @ChrisW67 pointed out is you are using Qt5 and Qt6 at the same time. Simply use Qt5 or Qt6, but not both.
  • Click event for QListWidgetItem

    Solved
    13
    0 Votes
    13 Posts
    899 Views
    S
    @shreya_agrawal It worked by installing the event filter on the table view of the calendar widget: ui->dateEdit->calendarWidget()->findChild<QTableView*>("qt_calendar_calendarview")->viewport()
  • how to change the color of title bar in mdi window

    Unsolved
    6
    0 Votes
    6 Posts
    3k Views
    IPlayGenji6I
    I don't know why QMdiSubWindow:title { background-color: green; } removes the icon. But this works perfectly. @Kogotoro said in how to change the color of title bar in mdi window: QMdiSubWindow{ selection-background-color: grey;/*for some styles it also used as title bar main gradient color...*/ }
  • Why is using EGL in Qt so hard?

    Unsolved
    6
    0 Votes
    6 Posts
    674 Views
    L
    I am try to render video too,i use egl can success show the key is GL_TEXTURE_EXTERNAL_OES
  • QOpenGLWidget And EGL Shrare Contex

    Unsolved
    1
    0 Votes
    1 Posts
    164 Views
    No one has replied
  • Detecting Monitor Resolution Change and Resizing Child Widget

    Unsolved
    3
    0 Votes
    3 Posts
    337 Views
    franco.amatoF
    Yes, it cannot be part of the layout of the main window area because the widget I have to render on top of it is semi translucent and the widgets below should be visible at the same time. Also the main window' widgets can not be moved when the game widget is shown. I don't use a stacked widget because the size between the game widget and the main window central widget is much different. That's why I render it on top of the main window and I manually resize it
  • Totally different look when compiled locally vs. on other computer

    Solved
    5
    0 Votes
    5 Posts
    454 Views
    S
    Ah, got it. This is caused by the KDE Breeze style as compared to the Fusion/Windows/etc. style. Fixed it by force-setting the style to Universal.
  • Cannot load TLS backend in Qt 6.8.1

    Unsolved
    7
    0 Votes
    7 Posts
    642 Views
    SGaistS
    Start your application with the QT_DEBUG_PLUGINS environment variable set to one to see if you get information about what is happening.