Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • 0 Votes
    5 Posts
    2k Views
    JonBJ
    @Donald-Duck Since your keys are QString you could save yourself some time/hassle with comboBox.setCurrentText(someKey) :)
  • Qt5 to Qt6 porting

    Solved qt6 qt5.15.0
    7
    0 Votes
    7 Posts
    2k Views
    Christian EhrlicherC
    A section to this change will be added in the next Qt6 version: https://codereview.qt-project.org/c/qt/qtbase/+/341841 Thx for the hint.
  • .UI to webpage(.HTML)

    Unsolved @dheerendra
    8
    0 Votes
    8 Posts
    6k Views
    V
    @JaimeEc Thank you for your support , this tutorial looks amazing .
  • QXmlQuery setFocus consuming memory wildly on a large Xml file

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

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Deploy Application in Linux

    Solved
    23
    0 Votes
    23 Posts
    4k Views
    Pablo J. RoginaP
    @hbatalha said in Deploy Application in Linux: I found out what I was doing wrong great! please don't forget to mark your post as solved.
  • Crash when run in Release mode?

    Solved
    36
    0 Votes
    36 Posts
    9k Views
    MucipM
    Dear @theldl , Where is the bug and did you inform LimeReport forum?... Regards, Mucip:)
  • Loop not working

    Solved
    4
    0 Votes
    4 Posts
    304 Views
    SGaistS
    @sowas good catch ! The blocking loop pattern made me miss that part.
  • PyQt5 Assign multiple functions to a button

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    Pl45m4P
    @kolle said in PyQt5 Assign multiple functions to a button: lambda: bot.accept_request(loop=True) What does this do? If it is a loop that blocks your EventLoop, the second signal can't get through.
  • Qt QgraphicsView FullScreen

    Unsolved
    5
    0 Votes
    5 Posts
    427 Views
    Pl45m4P
    Have you tried to set the content/layout margin to 0? Layouts have a default margin of 10px, if I recall correctly.
  • Qt6 QString[] QChar compare with char

    Solved qt6.0.2
    8
    0 Votes
    8 Posts
    3k Views
    D
    @JonB Oh buggers... I missed the " to ' change. Thanks! Yea that make more sense now o.o
  • Build QtOpcUa with OpenSSL return fatal error: openssl/asn1.h

    Solved
    3
    0 Votes
    3 Posts
    1k Views
    S
    Hi sir now am facing OPC installation on qt 5.14.0. Error :openssl/asn1.h file not found I changed in qmake config also as per ur suggestion still same error throwing can u help me to solve this issue
  • Closing the popup of the combobox with tree view

    Solved
    3
    0 Votes
    3 Posts
    262 Views
    B
    Thank you, In fact adding your usggestion didn't work because a click outside the combobox didn't trigger the MouseButtonPressed. But your suggestion gave me the idea to check what kind of events were triggered when cliking outside the combobox. I noticed that there is a mouseLeave event so I modified the eventFilter slot as follows: bool TreeBox::eventFilter(QObject *watched, QEvent *event) { if (event->type() == QEvent::MouseButtonPress && watched == m_tree->viewport()) { QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event); QModelIndex index = view()->indexAt(mouseEvent->pos()); if (index.parent().row()==-1) m_hide = false; else m_hide = true; } else if (event->type() == QEvent::HoverLeave) { m_hide = true; } } Now it's working
  • QListWidget selectedItem indexes

    Solved
    6
    0 Votes
    6 Posts
    5k Views
    eyllanescE
    @cdecde57 In that case, it is not necessary to use indexOf() since this will return the indexes with respect to the list of the selected elements and not with respect to all the QListWidgetItems. In this case there are 2 solutions: for(QListWidget *item: m_Ui->myQListWidget->selectedItems()){ int row = m_Ui->myQListWidget->row(item); qDebug() << row; } OR for(QModelIndex index: m_Ui->myQListWidget->selectedIndexes()){ int row = index.row(); qDebug() << row; }
  • QSqlDatabase: QPSQL driver not loaded - linux ubuntu

    Unsolved
    3
    0 Votes
    3 Posts
    4k Views
    E
    @JonB Found the problem sorry If you declare QSqlDatabase database database.addDatabase("QPSQL"); instead of QSqlDatabase database = QSqlDatabase::addDatabase("QPSQL"); It lost drivers pointer at open function
  • Drag and Drop issues on Windows

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    SGaistS
    Nice !! Thanks for sharing your discovery !
  • Prevent computer from sleeping using DBus

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    H
    @mrjj It seems "UnInhibit" is unknown so not sure it why seems to work. According to this doc it exists, not sure why I am getting the error saying it doesn't. If you pass it the wrong arguments the compiler will complain that it is receiving the wrong arguments at the same time saying it doesn't exist. Confusing. It seems the d-bus part is ported to windows but its unclear what it can do on this platform. Ok, I will be better off using SetThreadExecutionState I think.
  • Qt open source lgplv3

    Unsolved
    19
    0 Votes
    19 Posts
    2k Views
    SGaistS
    Well, use options.state to get the state and draw the rectangle accordingly. I am not sure what more information you need.
  • how to dynamically adding rows to QVBoxLayout

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    SGaistS
    Hi, You are just adding layouts to a newly created layout that has nothing to do with your widget.
  • Segmentation fault SIGSEGV

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    S
    @JonB Thank you for pointing out at the potential problems. For now, I found it to be a project/compilation issue. I changed the compiler version to Clang just like the other PC. Also I changed the debugger settings as suggested here https://forum.qt.io/topic/100958/catching-unix-interrupt-signal-on-console-application-when-debugging-with-qtcreator/3 and it seems to work.