Active Topics

 


Reply
Thread Tools
Posts: 13 | Thanked: 0 times | Joined on May 2010
#1
I'm using QT Creator, I am writing an app for my N900 to learn QT. I have a QListWidget that needs to finger scroll, but it seems every time I scroll, the current selection changes to the item my finger landed on to start scrolling. After I scroll, the highlight jumps back to the original item I had selected, but the selectedItem value stays at the item my finger landed on. This forces me to re-select the item after every scroll.
I saw a post about setProperty("FingerScrollable", true), but this does not help, It still behaves the same way.

This is really driving me nuts. How do I fix this?
 
kif's Avatar
Posts: 60 | Thanked: 40 times | Joined on May 2010 @ Skovballe, Denmark
#2
I have had the same problem in my ftp application,

In my case the program would open subfolders when you tried to scroll, highly infuriating.

I have 3 columns, so in my case I could limit the open folder function to the first column, not a great solution, and probably not one you can use.

Kim
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#3
Originally Posted by ongte View Post

This is really driving me nuts. How do I fix this?
I am also learning QT. Which signals are you connecting to in the list? Perhaps if you can post a code snippet that will help.
 
Posts: 13 | Thanked: 0 times | Joined on May 2010
#4
Here's the code I have problems with:

Code:
selectList->connect(selectList, SIGNAL(currentRowChanged(int)), this, SLOT(ChangeEffect()));

void MainWindow::ChangeEffect()
{
    soundfile = playItems.at(selectList->currentRow());
    player->setMedia(QUrl::fromLocalFile(soundfile));
}
I went from the signal itemSelectionChanged to itemChanged to currentRowChanged they all behave the same way, the currentRow changes when I scroll.
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#5
 
Posts: 13 | Thanked: 0 times | Joined on May 2010
#6
I tried the itemActivated signal, it's working great now. Thanks.

I'm also having trouble generating the source deb file from the Build -> Publish Project..
The process seems to complete fine, but I can't find the source deb anywhere. Is this function actually working?
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:44.