Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Red exclamation mark on the Desktop kit, macOS

    Solved
    5
    0 Votes
    5 Posts
    836 Views
    tomyT
    I filled in the <No Compiler> fields and the issue was worked out. :)
  • Restrict hidding of qsplitterhandle in qsplitter

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    N
    Something like this : QList<int> savedSize; MySplitterHandle *splitterHandle=qobject_cast<MySplitterHandle*>(splitter.handle(1)); connect(splitterHandle,SIGNAL(Clicked()),this,SLOT(handleClickedSot())); void handleClickedSot() //slot { QTimer::singleShot(50,this, &Widget2::showHideWidget); } void Widget2::showHideWidget() { m_ShowHideFlag=!m_ShowHideFlag; if(m_ShowHideFlag) { savedSize=splitter.sizes(); QList<int> newSize(savedSize); newSize[0]=0; //hide first widget splitter.setSizes(newSize); } else { splitter.setSizes(savedSize); } }
  • Generate unique hardware id - Cross platform

    Unsolved hardware unique
    8
    0 Votes
    8 Posts
    6k Views
    A
    Hi to all As of Qt 5.11 there is a static function in QSysInfo class: QByteArray QSysInfo::machineUniqueId() https://doc.qt.io/qt-5/qsysinfo.html#machineUniqueId
  • Get unique personal computer ID on Windows

    Unsolved
    5
    0 Votes
    5 Posts
    5k Views
    A
    Hi to all As of Qt 5.11 there is a static function in QSysInfo class: QByteArray QSysInfo::machineUniqueId() https://doc.qt.io/qt-5/qsysinfo.html#machineUniqueId
  • Calling a process in the main app and return the process's window ID?

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    Christian EhrlicherC
    @lansing said in Calling a process in the main app and return the process's window ID?: The problem I have is that I don't know how to get the window id of child process after I opened them. You create them, you communicate with them through shared memory and you've access to it's QProcess and therefore to it's stdout pipe - I think these are enough communication channels to pass the winid.
  • register mouse movement inside a particular window?

    Solved mouse mouseevent window signal movement
    2
    0 Votes
    2 Posts
    817 Views
    4
    Solved, overrode the standard event() and just used event.type() == QEvent::hovermove to get what I needed.
  • Check if buttons hidden on the widget

    Solved
    11
    0 Votes
    11 Posts
    3k Views
    mrjjM
    @Cobra91151 Well the continue is just optimization. if one is visible, no reason to check the others. Works the same checking all, though. Yeah, i guess so. even i didn't notice what but maybe both checking text and visibility in the same loop had some side effect.
  • How to use QObject in derived class

    Solved
    3
    0 Votes
    3 Posts
    261 Views
    I
    Thank you for the reply. I used Ui::MainWindow, because it didn't recognize MainWindow. Turns out i had a circular dependency issue with the #include files.
  • Can't debug with Qt 5.12.2 on Windows

    Unsolved
    7
    0 Votes
    7 Posts
    944 Views
    K
    I've submitted a bug report: https://bugreports.qt.io/browse/QBS-1433?jql=resolution %3D Unresolved AND reporter %3D currentUser()
  • QTableWidgetItem, emit signal when cell text changed.

    Solved
    10
    0 Votes
    10 Posts
    8k Views
    I
    Hello, I managed to do it using the last argument in QAbstractItemModel::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles) to fulfill the task. Just wanted to update this in case someone else needs it as it requires less manual work. connect(tableWidget->model(), &QAbstractItemModel::dataChanged, [this](const QModelIndex& index, const QModelIndex&, const QVector<int>& roles){ if (std::find(roles.begin(), roles.end(), Qt::EditRole) == roles.end())//wasn't caused by entering cell return; //rest of code
  • What sets resource.rc value assignments

    Unsolved project
    3
    0 Votes
    3 Posts
    787 Views
    mmikeinsantarosaM
    @Christian-Ehrlicher Thanks for the tip and will do. Mike
  • Can't close a QMenu opened through dbus by double clicking in another app

    Solved
    3
    0 Votes
    3 Posts
    415 Views
    fbg13F
    Solved it by adding QThread::msleep(150); to the dbus method before showing the menu.
  • TAB key is not working in PYQT5

    Unsolved
    14
    0 Votes
    14 Posts
    3k Views
    monamourM
    @Kent-Dorfman Many thanks,
  • why my widget does not redraw itself?

    Unsolved
    3
    0 Votes
    3 Posts
    561 Views
    aha_1980A
    Hi @Joshua-Qt, why do you actually want to mix MFC and Qt? You should be aware, that Qt (same as MFC) uses an event loop in background. If you want to combine both, both event loops must be run. That is surely not impossible, but advanced stuff that needs a deep understanding on what's going on in background. Regards
  • Video chat application on Windows 32 bit with Webrtc

    Unsolved
    1
    0 Votes
    1 Posts
    346 Views
    No one has replied
  • QSplashScreen - Focus lost

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    SGaistS
    Tested on macOS but it's working fine... Can you test with the 5.13 preview ?
  • CAN Message

    Unsolved
    5
    0 Votes
    5 Posts
    620 Views
    martial123M
    don't worry, i have found how i can do that.. yes it's understand me but he need to configure to talk the same language. And to do that, i need to send him many trame on serial port . but i have understand how he did it with class : CANMessage can_message; he created the class, it's not a basic class .. so i need to re created the same class to allow me send the good trame ..
  • VARIANT structure in qt

    Unsolved
    4
    0 Votes
    4 Posts
    517 Views
    hskoglundH
    Hi, to get the size of the SAFEARRAY, because it's 2D, you need to ask for the lower and upper bounds of both the dimensions, say something like this: long iLBoundX, iUBoundX,iLBoundY, iUBoundY; char * data; SafeArrayGetLBound((*var_array.pparray),1,&iLBoundX); SafeArrayGetUBound((*var_array.pparray),1,&iUBoundX); SafeArrayGetLBound((*var_array.pparray),2,&iLBoundY); SafeArrayGetUBound((*var_array.pparray),2,&iUBoundY); SafeArrayAccessData((*var_array.parray),(void**)(&data)); long szX=iUBoundX-iLBoundX+1; long szY=iUBoundY-iLBoundY+1; Note: this is a just a guess!
  • can't add an object to a QList

    Solved
    2
    0 Votes
    2 Posts
    304 Views
    Chris KawaC
    You're trying to copy the object into the list. QObjects are not copyable. To fix this you can change the list to be a list of pointers instead.
  • Open Serial Port

    Solved
    4
    0 Votes
    4 Posts
    445 Views
    martial123M
    Yes i have see that befor your answer ^^ its COM3 and not portname When i setPortName ty !