Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • Empty rows in QTableWidget

    10
    0 Votes
    10 Posts
    16k Views
    D
    [quote author="ChrisW67" date="1353472147"]I assume the slot is being called because you are manually connecting something to it. You have a slot called on_procTable_updated(bool) in your class that the ui->setup() tries to find a match for in the UI using QMetaObject::connectSlotsByName(). It fails because you do not have a widget called "procTable" that has a signal called "updated(bool)" in that UI. It's a warning, not an error. You can avoid it by naming your manually connected slot so it does not match the magic pattern. [/quote] Thank you, that explains a lot. I've gotten rid of the warning now. I was under the impression that by the way I had named the signal and the slot they should have successfully connected without the call to connect(), though.
  • [solved] Write into Excel table

    2
    0 Votes
    2 Posts
    4k Views
    S
    I found the solution here "Writing a Range of Rows & Columns to a Worksheet":http://www.qtforum.org/article/34059/qt-and-excel-writing-a-range-of-rows-columns-to-a-worksheet.html
  • Unsuccessfully post Event

    5
    0 Votes
    5 Posts
    2k Views
    P
    thanks. but my basic idea is to simulate a wheel Event as soon as something happen. post QWheelEvent is one of my choose. I have no idea what is wrong with my code above? welcome any other talent.
  • QDesktopServices and Networkpath

    5
    0 Votes
    5 Posts
    3k Views
    K
    Hmmm, okay, I'm not sure if I get it ... so one more example of what I'm doing (I might not have been very clear in my top post, sorry for that ...): I've got a html document on //nas01/dir/index.html. I open this html with QWebkit: @ def _init_web_viewer(self): self.web_viewer = QtWebKit.QWebView() self.web_viewer.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks) self.web_viewer.linkClicked.connect(self.open_in_external_browser) self.web_viewer.load(//nas01/dir/index.html) def open_in_external_browser(self, url): QDesktopServices.openUrl(url) @ Now I want that all links in this index.html are opened with the standard applications, e.g. IE (for flash content, I know there're ways to enable this in QWebKit, but I can't use those), Adobe Reader, Word, Outlook, ... My html looks like this: @ <!DOCTYPE html> <html> <head> <title>My App</title> </head> <body> <a href="flash_content.html">FlashStuff</a> <a href="doc.pdf">MyDocumentation</a> <a href="stuff/stuff_doc.pdf">Stuff Documentation</a> </body> </html> @ All files are located at the nas //nas01/dir/ and subdirs. When I replace the locations in the index.html by absolute paths pointing to a mapped drive, e.g. Z:\dir\doc.pdf where //nas01 is mounted at Z:, it does work as expected. Unfortunately I can't do that in my production environment. Cheers, Jan
  • PDF Paging issues text overflow

    4
    0 Votes
    4 Posts
    2k Views
    Z
    [quote author="asweetroxxi" date="1353505884"]the issue is the table is being populated from sql datebase would this be an issue. And i just started programming so please be discriptive me coding is still weak. [/quote] The fact that the text is not properly cut between pages in the resulting PDF file is not related to where you get the data from, being it a sql database, file or you simply add rows to the QTableWidget programmatically. Again I never used QTableWidget to print the data as a table in PDF file, but I used QWebView for that without the issue you have. If you want to to do it with QWebView you will need to read the docs on it and have some knowledge in HTML to be able to prepare the html page properly.
  • [solved]qt sql insert statement system not working

    22
    0 Votes
    22 Posts
    13k Views
    B
    Ok, set your thread to [solved] :)
  • 0 Votes
    4 Posts
    7k Views
    F
    Hi napajejenunedk, Did get the solution at the end? I'm facing exactly the same problem. Turns out that disabling the window management you lose all other capabalities such as minimize and keyboard focus, as documented in Qt documentation. Maybe removing the window management during the drag options and enabling again (but this would genarating some flickering). ...still, not desired.
  • Strange error message from QtCreator

    5
    0 Votes
    5 Posts
    2k Views
    B
    [quote author="gayu" date="1353498871"]Hope so the link will be helpful for you http://doc.qt.digia.com/qtcreator-snapshot/creator-debugger-engines.html[/quote] I've done what I'd read here, but this not solved my problem...
  • How to redirect QMessageBox text to a Textfile

    8
    0 Votes
    8 Posts
    3k Views
    A
    Ok, I have not tried this myself, but I would try this: Create an object that you install as an event filter on your QApplication. Listen for ShowEvents, and see if the object it was aimed at is a QMessageBox subclass. If so, you can read the text from it and log that.
  • Widget's geometry before first show

    20
    0 Votes
    20 Posts
    17k Views
    A
    You're right, I saw that ))), but as I understood DimanNe did find good solution. I've come across the same problem and QWidget::adjustSize() works well and looks better as for me. I posted that just for the case if someone like me has the same problem and check QWidget::adjustSize().
  • Static linking in Qt Comercial SDK

    13
    0 Votes
    13 Posts
    4k Views
    sierdzioS
    Nice, I'm glad it worked :)
  • 0 Votes
    1 Posts
    970 Views
    No one has replied
  • [Solved]Program exited with code 0

    49
    0 Votes
    49 Posts
    31k Views
    G
    I did it. Thank you so much :)
  • Close application and relaunch but with an argument..?

    11
    0 Votes
    11 Posts
    3k Views
    L
    Anyone about the question of alexandros?
  • QT 5 mixed opengl and qml problem

    3
    0 Votes
    3 Posts
    3k Views
    M
    In my example, i mixed old rendering opengl stuff with qquick item which used VBO i presume. I think, it's not a good idea to mixed that. So now i used VBO for my rendering and it's work.
  • [Solved] QPixmap: It is not safe to use pixmaps outside the GUI thread!

    2
    0 Votes
    2 Posts
    9k Views
    D
    I fix it.. but I not understand how a Simple Dialog with some message text can make this errors appears. Well, I remove the menssage errors and just add to log... it's better for user. Thanks all.
  • Best practices with QRunnable

    10
    0 Votes
    10 Posts
    28k Views
    M
    @INeedMySpace There's no argument that subclassing QThread can work -- and indeed it was the only way to use QThread in earlier versions of Qt -- but since that method is rife with potential problems, that particular methodology is deprecated for most common applications and should be avoided if possible.
  • [Solved] Windows - getting path of 64 bit process from 32 bit application

    4
    0 Votes
    4 Posts
    11k Views
    U
    Thanks rcari and MulderR. The LoadLibrary / GetProcAddress approach works well. Using QLibrary the working code looks like [code] // get process handle DWORD pidwin; GetWindowThreadProcessId(foregroundWindow, &pidwin); HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pidwin); // get process path WCHAR szProcessPath[MAX_PATH]; DWORD bufSize = MAX_PATH; QueryFullProcessImageName pQueryFullProcessImageName = NULL; pQueryFullProcessImageName = (QueryFullProcessImageName) QLibrary::resolve("kernel32", "QueryFullProcessImageNameW"); QString processPath; if(pQueryFullProcessImageName != NULL) { pQueryFullProcessImageName(hProcess, 0, (LPWSTR) &szProcessPath, &bufSize); processPath = QString::fromUtf16((ushort*)szProcessPath, bufSize); } [/code] More information on which function to use for the different windows versions - http://msdn.microsoft.com/en-us/library/windows/desktop/ms684919(v=vs.85).aspx
  • QComboBox with static image

    2
    0 Votes
    2 Posts
    2k Views
    JeroentjehomeJ
    You might want to check out the type of events that Qt can handle. For the given widget you might want to use this one: @QEvent::FocusOut 9 Widget loses keyboard focus (QFocusEvent).@ Then in that event set the value to the one with the icon only to display. Tada, should work Greetz
  • About running

    3
    0 Votes
    3 Posts
    1k Views
    JeroentjehomeJ
    Creator is probably set to debug, so it will be there. The command will run a executable, so can be anywhere. As Mulder says.....make sure that Qt can find the plugins